scheduled job execution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2025 08:06 AM
Hello All
I have a scheduled job which is getting triggered however it is not executing the script. Please find the snapshot below.
As per script, it should update the target HR case from suspended to work in progress and update the assignment group as well. However that is not happening.
Can someone please advise? Can we validate why its not working, is there something wrong with script or is it cross scope issue?
Script:
var gr = new GlideRecord("sn_hr_core_case_workforce_admin");
if (gr.get("0710fb561bc8a2d08dc18402604bcbcd"))
{ gr.assignment_group = "2c52d0031bb98ed0e89734cf034bcb99";
gr.state=10;
gr.assigned_to="";
gr.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2025 08:56 AM
yes I believe so and give the restricted caller access
OR
ensure your flow is in correct HR scope
If my response helped please mark it correct and close the thread so that it benefits future readers.
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-06-2025 09:02 AM
Flow is in HR scope only however the sys_trigger record which is getting generated as part of this flow is not updating the target HR case and the error seems to be restricted caller access.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2025 08:16 AM - edited ‎03-06-2025 08:16 AM
This is a scheduled item. You must define a schedule job (System Definition)!
Fill in some log statements like gs.info(....) to check if the record with that sys_id is really selected.
Enclose the code with try/catch to catch any exception.
I will always try to give a meaningful and valid answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2025 08:47 AM
How do you know the script is not executing? You said that the record does not get updated, but that's not the same as the script not executing.