croncheck – Know when your cron jobs silently fail
I built croncheck because my backup script was exiting 0 and producing empty files for three days before I noticed.
Heartbeat monitors (Healthchecks.io, Cronitor) tell you "did the job run?" They don't tell you "did it produce the right output?" My backup exited 0, reported to Healthchecks.io, and the monitor said "OK." The backup was empty.
croncheck checks three things:
- Liveness— did the job report within its expected window?
- Exit code — was it 0 (or your expected code)?
- Substring — does the output contain your success string? (e.g., "rows: 42", "backup complete")
If any check fails, you get an email. Deduplicated to 1 alert/hour/job.
How to use it:
Register a job (name, cron expression, timeout, optional expected substring). You get a ping URL. Add one line to your job:
curl -X POST https://your-instance.com/ping/YOUR_TOKEN \
-d '{"exit_code": 0, "duration_ms": 1200, "output": "backup complete, 42 files"}'
Dashboard shows OK/Failed/Missing/Timeout for every job. Last run, last 10 runs.
Tech: Cloudflare Workers + D1 + KV. Runs on free tier. MIT licensed. Self-hostable via Docker.
Why not just script it myself? You can. But: centralized view across all jobs and servers, no per-script monitoring maintenance, and alerts when you forget to check. The most dangerous failure is the one you never look at.
What's NOT in v1:regex matching, Slack/Discord, team accounts, historical charts, paid tier. This is a free experiment — I'm watching usage to decide if it's worth building more.
Repo: https://github.com/Aarav-coder6943/cronwatch
Live demo: https://cronwatch.aaravdevs.workers.dev
Top comments (1)
This is the exact failure mode that scares me most with scheduled jobs — exit 0 and silence. I run an algorithmic trading bot on a schedule, and the dangerous case was never a crash: it was a run that "succeeded" while producing stale or empty signals. Your third check — the expected substring in the output — is the one that actually catches that.
One thing I'd add from experience: check that the output contains a freshness marker (a timestamp, or a count that changes every run), not just a fixed string. A fixed "rows: 42" would still pass if the job is stuck replaying yesterday's result. The 1 alert/hour dedup is a smart call too — nothing kills a monitoring tool faster than alert fatigue.
Curious whether regex matching is on your roadmap for v2 — something like
rows: \d+would be a nice middle ground between a fixed substring and full parsing. Nice build!— Kamal