|
I have a python script that needs to run constantly (it sleeps every few secs so it doesn't hog resources) the link below seems like it will do the job but what's the best way to do the stop/restart side of things? a cross platform or cross linux os would be good. http://community.webfaction.com/questions/6157/watchdog-script-to-keep-process-running-with-cron |
|
I wrote a script which will start/stop/restart gunicorn/django here which records the PID and runs only if it is not running. It can be modified for other python apps. Hi Johns, That is exactly what I need thanks, trouble getting it to run my script though, doesn't write a pid file so stop/restart don't work. Can anyone point me in the right direction please?
The above script might need to be edited a bit to fit your own application. If you cannot figure out how to fix this, please feel free to open a ticket - we can take a look at it for you. |