I have several cron-jobs and background tasks on a variety of servers. These tasks can fail for any number of reasons:

  • lack of disk space
  • processing strange, unreadable file types
  • logical errors/bugs in the programs
  • invalid cron entry
  • invalid json received
  • network connectivity failure
  • db locks
  • system library update breaks program

Why they failed to run is important, but the most important thing is knowing they failed to run.

Is there a uniform way to monitor multiple jobs, and be alerted if they fail to run at their scheduled time, for any reason? I'm using Ubuntu, the scripts are primarily in Ruby.

Note:

I'm specifically looking for a framework or system that works across multiple servers, and that has alerting via email or text built in, and one that can survive limited disk-space. So the solution presented in How can I setup a system to tell me if a cron job is NOT running fine? doesn't seem applicable.

closed as off-topic by Michael Hampton, Brad Koch, EdChum, greg-449, Achrome Jul 4 '14 at 7:45

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Michael Hampton, EdChum, greg-449, Achrome
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 1 down vote accepted

Will http://www.pushmon.com fill your needs? It's built primarily to let you know if a cron job or scheduled task has failed to run. You can put it on any of your servers and has email and text alerts. The idea is you "ping" PushMon when your job has run successfully, and PushMon will alert you if it didn't receive the ping.

It's still under active development but I would encourage you to take a look at https://github.com/jamesrwhite/minicron, I believe it meets all the requirements you specified and more!

Disclaimer: I'm the developer working on it.

Cronitor (https://cronitor.io) was a tool I built exactly for this purpose. It basically boils down to being a tracking beacon that uses http requests as the pings (similar to pushmon).

However, one of the needs that I had (and that pushmon and similar tools couldn't offer) was getting alerts if cron jobs started taking too long to run (or conversely if they started finishing too quickly). Cronitor solves this by allowing you to optionally trigger a begin event and an end event in order to keep track of duration.

Duration tracking was a must have for me because I had a cronjob that was scheduled every hour, but over time started taking over an hour to run. That was a disaster ;)

  • PushMon actually handles daily schedules that take longer than expected. If you expect the job to complete at 8 AM, set the schedule "by 8:00 AM every day". – Bienvenido David Mar 22 at 2:29

Although it may not satisfy all your needs: https://github.com/javan/whenever

Not the answer you're looking for? Browse other questions tagged or ask your own question.