Speed Up Events and Emails While Testing

So, I’m quite an inpatient person. When I do something, I kind of what it to happen now…

When configuring in ServiceNow, it’s great. I update a business rule and I can immediately see the results.

Only times this isn’t the case, is when triggering an event, waiting to receive an email (and then process it) or waiting to send an email.

In these scenarios, it’s all run from scheduled jobs which trigger once every 2 minutes. To speed things up, I put together the following script below. To make it easier to access, I created a module in one of the administrator applications called ‘Run events’ and make it a type of ‘Script (from arguments)’. Then in the arguments put the following code:

new GlideSMTPSenderJob().execute();
new GlidePOP3ReaderJob().execute();

Clicking this will run all events, send all emails, receive all emails and then process the retrieved emails. To make it easier to access, you can drag and drop it on your bookmarks tab and make it a popup, so when testing you don’t even need to leave the window you’re working in at the time.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.