3

I have a server that I want to be able to schedule jobs on, and I need to be able to specify when those jobs happen to the minute. There will be a lot of jobs. (Things like sending e-mail notifications to clients).

This sounds like the perfect job for cron, however, I need to be able to handle downtime. In the event of downtime, I can't wait till anacron runs at the end of the day to reconcile all the missed tasks.

If I have a bit of downtime, I need all the overdue tasks to be run at boot.

For example:

  • Task is scheduled for 17:36
  • Machine is shut down at 17:33
  • Machine is booted at 17:40
  • Task is now overdue, and should be run as soon as possible.

Is there a way to change anacron into something that runs at boot and runs all the overdue cron jobs?

Or, is there some other common solution to this problem?

2 Answers 2

3

cron/anacron are not built with fault-tolerant or highly available scenarios. If your jobs are very critical I think Jobscheduler http://www.sos-berlin.com/jobscheduler-features will be beneficial for you. Just a headsup , its not easy to setup and will take a little time to get acquainted, but it is the best tool for scheduling

2

Any of the work queue systems out there should be able to do it. Celery, Resque, Sidekiq, backgroundjob, etc etc etc. Some of them have it built-in, others have a plugin that adds chronological dispatch.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .