Forums

Continuously running python script

I wish to be able to run my python script from the BASH shell console with high degree of confidence that the process will not stop and if it does stop then restart the script again and send some details of the reason why this occurred.

I had the script running in a BASH shell for 2 months or so without any problem, but then it stopped when I was unable to access it. I have since set it up in a detached SCREEN. Is this the best idea?

If you want something to keep running forever, then given that you have a paid account, your best option is to use an always-on task -- that's what they're designed for.

Thanks.