Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

What is exact role of Background Script.

Rohant Joshi2
Kilo Expert

Hello All,

 

I have a business logic script which is used by support team every time doing copy paste in background script. If I want to change this approach with Schedule script which will run on demand. What effect it will make on my system.

 

Please advice your suggestions.

 

Thanks.

Rohant Joshi

4 REPLIES 4

m_servicenow
Kilo Contributor

The person which having "security_admin" role can use Background script.


One Lock icon will appear near to impersonate button. Open that Link and use Background script.


Hello Mukesh,



Thanks for the reply but I don't want to know how to execute background script. What I want to know is impact of using schedule script which will run on demand instead of background script.



Rohant Joshi.


Hi Rohant,



It is better to use a scheduled script on demand instead of background script and practically there is no difference. Background script is generally used when you have to run a script for one time action or to run any clean up jobs mainly by admins but converting that to a scheduled script on demand gives more control and you can also review the code later if required which is not possible in a background script. You can also track in the running scheduled jobs if the scheduled script is taking more time than necessary.


Thanks Chandana that was very clear.