How to Monitor Cron Jobs in Node.js (node-cron & beyond)
Node.js apps schedule work in many ways — an in-process node-cron, a BullMQ repeatable job, Agenda, or a plain OS cron calling a script. All share the same blind spot: when the schedule breaks, nothing tells you. A heartbeat ping closes that gap.
node-cron
Wrap the job body and ping on success and failure:
import cron from 'node-cron';
const BASE = 'https://api.cronguard.dev/v1/ping/<your-uuid>';
const ping = (s = '') => fetch(BASE + s).catch(() => {});
cron.schedule('0 3 * * *', async () => {
await ping('/start');
try {
await runBackup();
await ping(); // success
} catch (err) {
await ping('/fail');
throw err;
}
});Plain cron calling a Node script
0 3 * * * /usr/bin/node /app/backup.js && curl -fsS https://api.cronguard.dev/v1/ping/<your-uuid>BullMQ repeatable jobs
Ping inside the worker processor, or use the completed and failed queue events to ping centrally:
worker.on('completed', () => fetch('https://api.cronguard.dev/v1/ping/<your-uuid>').catch(() => {}));
worker.on('failed', () => fetch('https://api.cronguard.dev/v1/ping/<your-uuid>/fail').catch(() => {}));Alerts that wake you up
Send those pings to CronGuard, set the expected interval, and get instant alerts over SMS, WhatsApp, Slack, Telegram or email when a Node job misses its window — plus execution-time tracking. Free to start, nothing to install.
Stop losing sleep over silent failures
CronGuard alerts you within minutes when a scheduled job fails to check in. No agent to install. Free to start.
Start Monitoring Free