How to *properly* push/migrate Scheduled Jobs from one instance to another?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2020 07:05 AM
Hello guys,
Scheduled Jobs are not part of the Application (are not considered application files), so they are not captured within an update set. I wonder, what is the correct procedure to migrate a Scheduled Job, from subdev > dev > test > prod?
We pull & push Update Sets from subdev to main dev instance. There, we make an app release, which is installed to test and prod. Regardless of this, when migrating from subdev > dev > test, I imported the Scheduled Job as an XML file. Record in sys_trigger.list was created on each instance.
The Scheduled Job executes properly on dev, but does not execute on test.
And today, on weekly push-to-test, somehow one of the Scheduled Jobs (an updated one) was a conflict with an existing Scheduled Job while installing the app on test instance. How come it was a part of a released app, when they are *not* considered application files?
Im very much confused, any clarification will be appreciated!
- Labels:
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2020 07:09 AM
Hi,
ideal method is to do export and import of those between the instances
after you import the xml for schedule job you need to make some change in order to make it run as per it's timings; just add some space in name and save and again remove the space in the name and save it
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2020 07:21 AM
Thank you for your reply.
I have been advised so - but why is that an ideal method? What is the difference between making it (sysauto_script and sys_trigger) an application file and exporting/importing it as an XML
Why it needs to be modified in order to run properly?
I need to convince the Release Management to do it this way and I highly doubt this would be enough explanation :/...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2020 07:28 AM
Hi,
by design scheduled jobs are considered as data records and hence not captured in update sets
you can use the add to update set utility to capture schedule job in an update set
https://www.servicenowguru.com/system-definition/manual-update-set-inclusion/
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2020 11:58 PM
I am glad to hear the comment has helped.
Saying this, I will appreciate if you close this thread, as answered. This enables other members to learn from this thread.
Have a great rest of the day
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader