- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 01:48 AM
Hello Experts,
I am looking for the recommendations and best practices to replace long running scripts.
Kindly advise
Thanks and Regards,
Meenal
Solved! Go to Solution.
- Labels:
-
Script Debugger
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 01:55 AM
There are many ways to go by it
1) you can always check the 'All active transactions' from left nav.
2) You can take a look at slow queries and scripts and debug there.
One very important thing to note is: If there is a script that runs once a month for 5 mins Vs a script that runs 50 times a day for 30 sec, which one do you think needs more attention? 🙂
-Anurag
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 01:53 AM
You need to check that in the transaction logs.
Which script is taking long time to run; you can also kill the transaction if something is running in long i.e. possibly some script which is not proper
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 01:55 AM
There are many ways to go by it
1) you can always check the 'All active transactions' from left nav.
2) You can take a look at slow queries and scripts and debug there.
One very important thing to note is: If there is a script that runs once a month for 5 mins Vs a script that runs 50 times a day for 30 sec, which one do you think needs more attention? 🙂
-Anurag
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2025 08:13 AM
Good afternoon, my question is, what do you consider health scan to be heavy? since there is a script with the same execution average.
On the other hand, should I look at the average execution time or the total execution time?
Thank you very much for your contribution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 02:04 AM
Hi Meenal Gharat
practices to replace long running scripts.
An additional trick you can use if your browser session is blocked, is to navigate to https://myinstance.service-now.com/cancel_my_transaction.do
This behaves in the same way as navigating to the 'Active Transactions' module and will, in most cases, terminate the running transaction which is blocking your session.
This is quite handy, as you are not reliant upon other people to intervene on your behalf. You also do not have to play node-roulette with the load balancer to find your way to the same node (if you were to use a different browser and the Active Transactions module).
How to Cancel a Long Running Transaction:
https://hi.service-now.com/kb_view.do?sysparm_article=KB0635968
If it help mark helpful or correct
Thanks and regards
Anil