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.

Automate killing of long running scheduled job

Pratima G
Tera Contributor

Hi all,

 

We have a requirement from customer that if scheduled Job is running for more than an hour , it should be stopped automatically.
Is there any way to automate this procedure ? if so, where can we add the required steps ?

 

Thanks,

PG.

5 REPLIES 5

Hi @Amit Gujarathi ,

 

sys_trigger table is actually not showing the job i am executing. 

It does available in the Active Transactions table. If we use Active Transactions table in the code you provided instead of sys_trigger, can you help me with the query that can identify respective scheduled job ?