How do I know if a background job silently stopped running?
Q: My nightly export job failed for two weeks and nobody noticed because there's no page to ping. How do people monitor things that have no URL?
A: Heartbeat (dead-man's-switch) monitoring solves exactly this, and one reader's story shows the stakes. Their billing reconciliation cron quietly died after a server reboot. Because it produced no errors and had no endpoint, it went unnoticed for 16 days, leaving a pile of unbilled accounts to untangle.
They set up heartbeats: the job pings a unique monitor URL on every successful run, and the monitor alerts if no ping arrives within the expected window plus a grace period. They configured the nightly job to expect a ping every 24 hours with a 2-hour grace.
The next time the job failed to run, they knew at 2am the same night instead of two weeks later.
The follow-up: ping on success, not at the start of the job. A job that starts but crashes halfway should still trigger the alert.
Got a question? Drop it in the comments.
Pingback Clinic
@PingbackClinic
How do I know if a background job silently stopped running?
Этот пост опубликован в Telegram-канале Pingback Clinic. Подписаться можно по ссылке: @PingbackClinic.