Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Trigger multiple scheduled jobs from script

dev_123
Tera Contributor

Is it possible to trigger multiple scheduled jobs from a script?

There are around 20 scheduled jobs (these are being found as I've logged them out) but I can't seem to find anything on triggering all these jobs? I know it's possible to trigger one. Any help would be great.

 

Thanks!

1 ACCEPTED SOLUTION

DrewW
Mega Sage

You can use

SncTriggerSynchronizer.executeNow(current);

where current is a record from sysauto.

 

View solution in original post

3 REPLIES 3

DrewW
Mega Sage

You can use

SncTriggerSynchronizer.executeNow(current);

where current is a record from sysauto.

 

dev_123
Tera Contributor

Thanks Drew. I was able to get this working. I wouldn't work with a gliderecord to sysauto but did work on scheduled_import_set

Prince Arora
Tera Sage

@dev_123 ,

Please use ,
var gr = new GlideRecord('sysauto_script');
gr.addQuery('name', 'YOUR_JOB_NAME_HERE');// apply filter according to your requirement.
gr.query();
while(gr.next()){
 SncTriggerSynchronizer.executeNow(gr);

}
Please mark my answer helpful or accept it, if it works for you!