Skip to content

Commit da6d09a

Browse files
Scheduled Job Update Set Capture Script (#2572)
* captureScheduledJob.js * README.md
1 parent fa476f9 commit da6d09a

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Scheduled Job Update Set Capture Script
2+
3+
This ServiceNow background script addresses a critical deployment challenge by programmatically capturing scheduled jobs in update sets.
4+
By default, ServiceNow scheduled jobs are not automatically captured in update sets, making them difficult to migrate between environments.
5+
This script uses the GlideUpdateManager2 API to force a scheduled job record into the current update set, enabling seamless deployment through standard update set processes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
var gr = new GlideRecord('sysauto_script');
2+
gr.get('<sys_id of your scheduled job>');
3+
var gum = new GlideUpdateManager2();
4+
gum.saveRecord(gr);

0 commit comments

Comments
 (0)