Dev.to WebDev 🛠 Dev 👁 0 📖 2 min read

Your cron jobs are failing silently — and you won't find out until it's too late

A few weeks ago I went to restore a backup. The newest file was three weeks old. The cron job had quietly stopped running. No error. No email. No crash. It just… stopped — and nothing told me until the exact moment I ne

A few weeks ago I went to restore a backup. The newest file was three weeks old.

The cron job had quietly stopped running. No error. No email. No crash. It just… stopped — and nothing told me until the exact moment I needed it.

If you run anything on a schedule — backups, syncs, cleanups, report jobs — this is the failure mode that should keep you up at night, because nothing is watching for it.

Why this failure is invisible

We tend to monitor the wrong things:

  • Uptime checks tell you a server is up. The server was up. The job still didn't run.
  • Logs tell you what happened — if you remember to go read them. Nobody reads logs for a job they assume is working.
  • Neither tells you that the thing you scheduled simply never executed.

That gap — the scheduled task that silently disappears — is the one that bites.

The pattern that fixes it: a dead man's switch

Instead of watching for something to happen, you watch for something to stop happening.

The job "checks in" by pinging a URL every time it succeeds:

0 2 * * *  /backup.sh && curl -fsS https://your-monitor/p/abc123

The trick is the &&: the curl only runs if /backup.sh exits successfully. So:

  • Backup works → ping arrives on time → silence (all good).
  • Backup fails, server reboots, disk fills, cron breaks → no ping → you get alerted.

Your monitor just needs to know the expected interval (say, every 24h) plus a grace period (say, 1h) and alert you when a check-in doesn't show up in time. No agent to install, no library to import — if your job can run curl, it can be monitored.

Your options

  • Roll your own: a tiny service that records "last seen" per check and a cron that flags overdue ones. It's genuinely a weekend project.
  • Use an existing tool: Healthchecks.io (open source, self-hostable) and Cronitor both do this well.

What I'm building

I liked the pattern so much I'm building a deliberately minimal version of it — Stillwatch 🦉 — with one twist: a one-time lifetime price instead of a monthly subscription. For small, personal jobs I never wanted another recurring bill just to know when something breaks.

It's at the validation stage right now (landing + waitlist, MVP in progress). If this problem has ever bitten you, I'd genuinely love your take — and there's a waitlist if you want to be an early tester:

👉 https://stillwatch.netlify.app/

One question for you: how do you currently catch a cron job that silently dies — a homegrown script, a paid tool, or (be honest) nothing yet?

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.