BullMQ and node-cron discovery (not yet published)
Not yet published. A CronRadar package that finds BullMQ and node-cron jobs automatically is built but not released. Its npm package, cronradar-node-discovery, and its repository are not public yet, so nothing on this page can be installed today. Once it is published, this page carries its setup guide.
What it will do
You add one call at startup, and it keeps CronRadar in sync with your scheduled jobs:
- BullMQ: every Job Scheduler in the queues you pass, legacy repeatable jobs included, becomes a monitor with its cron pattern, keyed
<queue>-<scheduler id>. Each run a worker processes is reported as a start, a completion, or a failure once BullMQ has no retries left. - node-cron: every task you schedule through the copy of node-cron it returns becomes a monitor keyed by the task's
name, and each call of the task function is reported. node-cron itself is not changed. - a removed scheduler or task's monitor is paused, with its history kept
- a job opts out with
{ cronradar: false }in its options, or by name in askiplist
The application's API key is its only required configuration. Five-field schedules and shortcuts such as @daily are sent as written, and a six-field schedule whose seconds field is 0 loses that field. A job that runs more than once a minute, or a BullMQ scheduler with an every interval and no cron pattern, is not monitored and is named in a warning.
CronRadar evaluates schedules in the application's time zone. A BullMQ tz or node-cron timezone that differs, or the process's own zone when neither is set, needs an application set to that zone; the package warns about a mismatch.
Monitor BullMQ and node-cron jobs now
Until the package is published, wrap each job with the Node.js SDK: cronradar.wrap('nightly-backup', task, { schedule: '0 2 * * *' }) reports its start, completion and failure, and the schedule registers the monitor. Use the same key and schedule your scheduler uses. See cron schedule syntax for the schedules CronRadar accepts.