You are currently viewing How To Add Schedule Job In Update Set In ServiceNow?

How To Add Schedule Job In Update Set In ServiceNow?

Working on schedule job is easy than moving it from one instance to another. Because servicenow do not provide way to capture schedule job in update set. You have to export it and then import into the other instance.

And this keeps on going with every update and with more number of instances you have.

But if you use below script , you can add the job into your current update set. Just run below script in background script

//Sample Script
var gr = new GlideRecord('sysauto_script');
gr.addQuery('sys_id','99c6f38b0f223010e28740c1df767efe');
gr.query();
if(gr.next())
{
   var um = new GlideUpdateManager2();
   um.saveRecord(gr);
gs.print("record saved");
}
Note:-
Just replace the sysId with your jobs sys_id.

Video Tutorial:-

Leave a Reply