Every team I've worked with has at least one cron job that failed weeks ago and nobody noticed. The nightly database cleanup that stopped running after a server migration. The report generator that's been throwing errors into /dev/null since someone changed the DB password.

The pattern is always the same: cron runs, something breaks, cron doesn't run anymore, silence.

Why cron fails quietly

Cron itself doesn't have a concept of "this job should have run but didn't". It fires based on schedule. If the process exits with an error, cron doesn't care. If the server was down during the scheduled time, cron doesn't retry.

# This will fail silently forever if backup.sh exits non-zero 0 2 * * * /opt/scripts/backup.sh 

Most people add email notifications:

MAILTO=ops@company.com 0 2 * * * /opt/scripts/backup.sh 

Which works until your mail server is also the thing that broke. Or until the ops mailbox has 4000 unread cron emails and nobody checks it anymore.

The dead man's switch approach

Better pattern: instead of alerting on failure, alert on the absence of success. Your cron job pings a URL after completing successfully. If the ping doesn't arrive within the expected window, something's wrong.

0 2 * * * /opt/scripts/backup.sh && curl -fsS https://your-monitor/ping/abc123 > /dev/null 

The && matters — the ping only fires if backup.sh exits 0. If the script fails, no ping. If the server is down, no ping. If cron itself is broken, no ping. All three scenarios trigger an alert.

What to monitor (and what to skip)

Not every cron needs monitoring. Here's how I think about it:

Always monitor:

  • Database backups (you'll regret it if you don't)
  • Payment processing jobs
  • Data sync between systems
  • Certificate renewal scripts
  • Anything that runs less than daily — easy to miss

Probably skip:

  • Log rotation (OS handles recovery)
  • Cache warmers (self-healing usually)
  • Dev environment tasks

Grace periods matter

Don't set your alert threshold to exactly your cron interval. If your backup runs at 2 AM and usually takes 20 minutes, don't alert at 2:01 AM. Give it a grace period — maybe alert if it hasn't pinged by 3 AM.

Jobs that run on loaded servers will occasionally take 2x or 3x longer. You want to catch actual failures, not slow runs.

The overnight test

Here's something I do with any new monitoring setup: set up the monitor, then intentionally break the cron job. Comment it out, or make the script exit 1. Wait for the alert. If it comes within the expected timeframe, you're good. If it doesn't, your monitoring has a gap.

Sounds basic but I've seen teams set up monitoring dashboards that look great and never actually verified they fire alerts.

Anyone else have war stories about silent cron failures? The worst one I've seen was a backup job that had been writing to a full disk for 6 months — zero-byte backups, no errors, no alerts.