- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2024 02:32 AM
Hi ServiceNow Users,
I have a general question. We have created a scheduled script execution that runs every day at 10'o'clock and checks specific incident fields. If certain values are true, the script updates the incident accordingly and also adds a work note into the record.
Everything works perfectly - however, the script somehow runs as the user who created the script so that all work notes are also being added AS the user who created the script. This leads to some notifications not running as well as we don't want the script to stop in case the user leaves the company in the future. Is there are possibility, kinda compared to Scheduled Import Jobs for example, to run the script as system user or so?
Thank you!
Regards
Elena
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2024 03:17 AM - edited ‎03-08-2024 03:18 AM
Hi @ehgebla ,
You can bring the field Run as from List Layout and select the user but make sure that user is active and have the required roles,
To bring this field on form You can do the following,
1. Right click on Scheduled Job -> configure ->List Layout
2. from slush bucket move Run as from left to right and save it.
Once you get this on form you can set the value, save it and execute it.
Please check and Mark Helpful and Correct if it really helps you.
Regards,
Swathi Sarang

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2024 02:53 AM
Hi @ehgebla always create a unique User and run as this user in schedule jobs so that you know how the data was updated. If you use system user or any internal user, during audit it will be difficult to figure out who actually updated the data.
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2024 02:57 AM
Hi Harish,
we do have a user we would use for this case but that is exactly my issue: we can't change on who is running the script. Changing the run as is not possible for scheduled script executions, it seems.
How to change that without logging on as the user as create everything anew?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2024 03:01 AM - edited ‎03-08-2024 03:02 AM
Hi @ehgebla you can change the user under run as field
can you share the screenshot of this job?
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2024 02:58 AM
Hi, you can use the "Run As" field in the scheduled job to do this. By default it might not be displayed in the form and you need to bring it out.