Scheduled Script Execution - Run As System User?

ehgebla
Giga Guru

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

1 ACCEPTED SOLUTION

swathisarang98
Giga Sage
Giga Sage

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 

   

swathisarang98_0-1709896561448.png

2. from slush bucket move Run as from left to right and save it.

swathisarang98_1-1709896620254.png

 

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

 

 

View solution in original post

9 REPLIES 9

Hi Raaj,
not there for me. Also checked Personalized Form, everything is checked. 

 

Screenshot 2024-03-08 120545.png

 

swathisarang98
Giga Sage
Giga Sage

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 

   

swathisarang98_0-1709896561448.png

2. from slush bucket move Run as from left to right and save it.

swathisarang98_1-1709896620254.png

 

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

 

 

this was too easy i even feel too ashamed to say thank you haha. thanks a lot. i actually didn't checked the form layouts, since the run as was there when it wasn't a script execution. i should have thought about that myself...

anyways; thank you!

@ehgebla no worries, sometime it happens 😁

AJ2025
Tera Contributor

I think the best we can do is to run it as "System Administrator". There doesn't seem to be a way to run it as "System" like a flow...