How to stop an infinite loop

amaradiswamy
Kilo Sage

Hi All,

I have written a scheduled job for inserting some records into a table. At first i have written a wrong condition and this resulted into an infinite loop. I have deleted the scheduled job also and created a new scheduled job with the correct conditions. But, the logs that i have included in the script for testing are coming continuously. Is there any way to stop these type of logs.

Thanks in advance.

Regards,

swamy

14 REPLIES 14

Did you perhaps clear the cache to make sure that it isn't stored?   You can do that with a cache.do.


Thanks for the response. i tried that but it's still generating the log.


Uma2
Tera Expert

Hi all,

now i am facing the same issue could you please provide the solution if any one find,it will helpful for me.

 

Thanks,

Uma.  

VaranAwesomenow
Mega Sage

Based on my recent learning, if a workflow gets stuck due to infinite loop ( maximum allowed activity transactions) then it doesnt allow you to kill it even in active transactions in some cases, if that happens one option is to do a rolling bounce of node which support.servicenow.com team can do it, this generally occurs only in case of production, in non-production those active transactions automatically go away after few hours.

RiteshSwarnakar
Giga Guru

Incase Kill action on Active Transaction is not working.
Work Around to atleast prevent inserting: Create a Before Business Rule on that table -> Specify some when to run condition or you can also leave it blank -> Tick the Abort Action