Schedule automatic "Kill", if the job does not stop -FAILS

What might be reason for this failure? I had enabled these options in Trigger to Stop and Kill the run after 5 hours. It did not work as supposed to… What could be the reason?

The settings schedule a job to stop after 5 hours and automatically kill it if it does not stop within an additional 5 minutes. (Captioned by AI)

Hi @ext-o

No need to use the second option, directly use the First option if you want to abort the bot after exactly 5 hours then in the dropdown select the kill instead of using Stop.

Hope it helps!!

Kill is a bad idea, it just immediately terminates the job - which might cause you problems if it’s in the middle of processing something.

Stop requires you to use the Should Stop activity in your automation. It doesn’t stop the job, it just allows you to detect the stop command in your code and then exit gracefully, but you have to code the exit.

1 Like

Thank you for your answer… Did not help though.

I would rather use option Stop (at first), because then it executes the unfinished item properly to the end and stops right after it. If I would directly choose option Kill, it would leave it unfinished, which is not good. It should use option Kill only if Stop did not work. Now both of these failed to end the job, and it kept running over 5 hours.

Have you used the Should Stop activity in your automation?

So far there has not been use for it (Should Stop). Before those Stop and Kill Trigger options have been working as supposed to. OG questions was, what might be the reason why those fail…?

Yes @ext-o absolutely correct. Have you used the Should stop activity at the starting of the new transaction item.

If you are using reframeworks then the shouldstop in get transaction state will automatically stops the process.

Hope you understand!!

That’s impossible. The Should Stop activity works in conjunction with the stop command being sent from Orchestrator. Selecting “stop” in Orchestrator won’t, and CAN’T, do anything - it can’t know WHEN to stop. You control WHEN to stop within your code by using Should Stop to detect the stop command and then stop gracefully. It’s up to you to code the automation to stop if Should Stop returns true.

1 Like