DEV Community

mawmawia
mawmawia

Posted on

I built an API that detects missed cron jobs without heartbeats

The problem with heartbeat cron monitors

Traditional tools like Healthchecks.io work like this:

  1. Your cron job runs
  2. At the end, it pings a URL: curl https://hc-ping.com/uuid
  3. If the ping doesn't arrive, you get alerted

But what happens if your server crashes at step 1? Or the job OOMs before the curl command?

You get silence. And silence looks like success.

I lost client data when a backup cron failed silently for 6 days. The job never started, so it never pinged. No alert.

My solution: Schedule validation instead of heartbeats

I built RK Cron Monitor. Instead of asking "did the job phone home?", it asks "should the job have run by now?"

How it works:

  1. At the end of your cron script, POST your last_run_timestamp + cron expression

bash
curl -X POST https://api.rkcron.com/check \
  -H "Content-Type: application/json" \
  -d '{"cron": "0 2 * * *", "last_run": "2026-06-02T02:00:00Z"}'
Enter fullscreen mode Exit fullscreen mode

Top comments (0)