How can I ensure a periodic task will run forever on a linux machine?

175 Views Asked by At

I have a task that I want to periodically on a remote linux machine. What is the best way to ensure that it will run forever? I currently have it running as a celery job, but I wonder if a cron that simply calls a python script would be more durable.

My priorities are that if the task were to fail or exit with failure for some reason that the next scheduled job would run as normal.

Is there a better option than cron or celery? I know sometimes people use things like supervisor to ensure that a process restarts if it fails but what if supervisor fails?

0

There are 0 best solutions below