Nodejs Cron Health Checks: 5 Heartbeat Controls for Missed Marketplace Jobs
TL;DR: A Nodejs cron health check needs an external heartbeat monitor to detect a missed job in the nightly marketplace pipeline. Metrics and structured logs should explain runs that did arrive, including timeouts, retries, reconciliation status, and the workload responsible for their cost. Logs alone cannot report code that never executed. The decision is a layered one: use a Healthchecks-style…
The article discusses the importance of implementing a Nodejs cron health check to detect missed jobs in a marketplace pipeline. The key points are that absence must be observed from outside the process, and an external heartbeat monitor is needed to detect missed jobs. The article outlines five controls for a Nodejs cron health check: expected-run control, attempt control, diagnostic control, attribution control, and notification control.
Each control has specific requirements and failure boundaries, such as using a heartbeat service to own the cron schedule and grace period, recording start, failure, and success against one run_id, and attaching stable, low-cardinality dimensions such as pipeline_id and cost_center to metrics and logs. The article emphasizes the importance of separating concerns between the heartbeat service and the worker process, and the need for explicit notification delivery.
Brief written by urgent.news from Dev.to's own syndicated text. Machine-written — may contain errors; check the original before relying on it.