- /
-
- Automations /
- Async /
- Script Actions
Script Actions
Scripts to run on Events
Last modified 2025-07-10
Jace Benson
Script actions are so powerfulbecause Servicenow has a very robust event driven design. And the script actions they execute code for any given event. Script actions run based on those events in those events are the results of triggers. When I say triggers I mean the cyst trigger table which powers all of the events in service now and all of the scheduled stuff that happens in a queue and ServiceNow.
https://www.servicenow.com/community/developer-articles/script-action-a-practical-example/ta-p/3136671
https://www.linkedin.com/posts/michaelbahr_servicenow-servicenowdev-activity-7010050167122923520-Zjz5/?utm_source=share&utm_medium=member_desktop
Have you ever had a runaway ASYNC business rule? Me too! Here’s how to stop it dead in its tracks.
- Deactivate the business rule and save it
- Export the business rule to XML
- Delete the business rule
- Go to the sys_trigger table and look for ASYNC:
- The number of jobs should be decreasing, once they are gone re-import the BR XML
Questions:
Why can’t I just deactivate it? A: The train has left the station. At the level the system is performing the operation(s) it doesn’t care. It's pointed to a record and it will try to run whatever it's told to run.
What if I comment out my code temporarily? A: That ship has set sailed. As long as the sys_trigger is calling a valid sys_id it will keep running. When you temporarily delete the BR in question you break that reference which breaks that infinite loop.
https://www.servicenow.com/community/in-other-news/performance-considerations-when-using-async-business-rules/ba-p/2274036