How to run Scheduled Jobs sequentially

TAKEUCHI
Tera Contributor

When a record is inserted into a specific table, a Business Rule is triggered, and from the Business Rule, a Scheduled Job is initiated as follows.

var grSS = new GlideRecord("sysauto_script");
grSS.addQuery('name', jobName);
grSS.query();
if (grSS.next()) {
    SncTriggerSynchronizer.executeNow(grSS);
}

However, the Scheduled Job is running in parallel, and the expected process is not being executed. Is there a way to run the Scheduled Job sequentially? If not, is there a way to run the events sequentially?

1 ACCEPTED SOLUTION

Juhi Poddar
Kilo Patron

Hello @TAKEUCHI 

Unfortunately, there is no out-of-the-box method in ServiceNow to execute Scheduled Jobs or events sequentially, as they are designed to run asynchronously. Achieving sequential execution would require implementing custom logic or using additional mechanisms to control the processing order.

 

If this helped please hit like and mark it as an accepted solution.

 

Thank You 

Juhi Poddar 

View solution in original post

2 REPLIES 2

Satoshi Abe
Mega Sage

Juhi Poddar
Kilo Patron

Hello @TAKEUCHI 

Unfortunately, there is no out-of-the-box method in ServiceNow to execute Scheduled Jobs or events sequentially, as they are designed to run asynchronously. Achieving sequential execution would require implementing custom logic or using additional mechanisms to control the processing order.

 

If this helped please hit like and mark it as an accepted solution.

 

Thank You 

Juhi Poddar