Forums

Restarting alywas on task at specific point

Hello Together

I have an always-on-task, that i sometimes manually restart when i change something with my code. However I want to block some parts of my code, so that the restart happens after the execution of this specific parts. What i want goes into a similar direction as delaying a keyboardinterrupt (https://stackoverflow.com/questions/13199413/delay-the-keyboard-interrupt-in-python-for-an-important-part-of-the-program). However, I am not sure if this is also applicable here.

So is it possible?

Thank you very much

If you just sys.exit at any point in your code, that will end the task and our systems will restart it.