Scheduled Script Execution is not Executing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2023 01:49 AM - edited 01-02-2023 04:12 AM
I have one scheduled job script which needs to check all Alert Management Rule [em_alert_management_rule] records. They need to be deactivated all rules in Instance at every day. But it is not Executing automatically when the Time is set for 16:00. But it is happening when I click on Execute Now so that all records are getting in to Deactivate state.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2023 02:00 AM
Hi @raghavasadanagi ,
Try adding log statements at the first and last line of code to check if the code written is fine or not.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2023 02:19 AM
As you added the time zone, it will trigger on that time zone's 4pm. So please check in that time zone.
One more thing is you have a variable called get, change it to instance_name.
get might be some keyword.
Please mark as helpful/correct answer based on impact.
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2023 02:29 AM
Hello @raghavasadanagi ,
Did you tried executing it on Demand is the scheduled job working?
Please try once on Demand.
Thanks,
Omkar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2023 04:09 AM
Its working in on Demand but not in working as per scheduled period of time