I want to trigger a scheduled job from Business rule..

saurabhchande
Tera Expert

I want to trigger a scheduled job from Business rule.. Can anyone let me know if it's possible and if yes then how? Many thanks

10 REPLIES 10

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Saurabh,

Following code you can have to trigger schedule job from business rule.

var schImp_GR = new GlideRecord('sysauto');
schImp_GR.addQuery('name','<name>');
schImp_GR.query();
if(schImp_GR.next()){
SncTriggerSynchronizer.executeNow(schImp_GR); // this is for global scope
}

Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,

Is there any way to trigger the reports using business rule.

 

Regards,

Devika.

Hi,

yes

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Please let me know if there is a  script for triggering the scheduled reports through a br. In UI actions there i didnt find the 'Execute now' action for the 'sysauto_report' table.

Hi,

this is quite older thread.

I would request to raise new question so that other members can also help

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader