Menu

Cohort Experiment Monitoring: How Node.js Cron Health Checks Detect Missed Jobs
📰

Cohort Experiment Monitoring: How Node.js Cron Health Checks Detect Missed Jobs

DEV Community: typescript·RemingtonCross5246·2 days ago
#31vrbbaZ
#devtotypescript#devto#dev#cohort#deadline
Reading 0:00
15s threshold

A Node.js cron health check should detect a missed job by looking for durable run evidence, not by trusting process uptime. For a property-management SaaS, use two independent paths: the scheduled worker writes that evidence, while a heartbeat watchdog checks deadlines and raises one alert when the record is absent. A timeout should mark the cohort experiment run as uncertain, not trigger an invisible retry. This costs more implementation time than a bare heartbeat, but it preserves the facts needed to explain which tenant cohort saw which treatment.

TL;DR: track scheduled, started, completed, and failed timestamps under one run ID; define the deadline from the schedule plus tolerated delay; make retries keep that run ID; and place the watchdog outside the worker process. A completion heartbeat is the runner-up.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.