0

I have a script on my machine that I want to start running as the machine boots and will attempt run again should it crash or otherwise fail.

Would this mean turing it into a service? I realise I could use the crontab and use @reboot, but that doesn't fix the issue should the script crash

gazzwi86
  • 1,019
  • 1
  • 15
  • 35
  • 1
    Check out http://stackoverflow.com/questions/1423345/can-i-run-a-python-script-as-a-service – akluth Apr 23 '13 at 15:11

1 Answers1

1

I would start it using init and monitor at interval with a seperate script using crontab watching for a PID file it creates.

Alternatively, if you can find the PID ID using your crontab script (using ps) and re-init the script if it doesn't exist.

My 2 Cents..