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,038
  • 1
  • 13
  • 35

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..