This project is not covered by Drupal’s security advisory policy.

CronWatch records every Drupal cron run, and each module's hook_cron within it, in your site's own database, and alerts you when cron stops running, a hook fails, or a run gets stuck or runs slow. No external service, no account: it is part of the open source CronWatch library (https://cronwatch.dev).

Features

  • Watches cron with no code changes: each cron run is recorded as the job drupal:cron, and each module's hook_cron as drupal: plus the module's name (for example drupal:system), whether cron runs from Automated Cron, drush cron or the cron URL.
  • Works with Ultimate Cron: each of its jobs is recorded as its own run, whether cron, the Run button or drush cron:run started it, on the schedule Ultimate Cron gives that job, so a job that does not run on time is reported missed.
  • Alerts once when something goes wrong and once when it recovers: cron missed, a hook failing, a run stuck past its timeout, or a run far slower than usual.
  • Opt-in watching of queue workers, with each item processed recorded as a run.
  • A dashboard under Reports: the last 24 hours of runs, each job's week, and every run with its output and error.
  • Alerts by email (through Drupal's mail system), Slack or a webhook.
  • An optional JSON API for the CronWatch MCP server, so AI coding agents can read failures and run a check. Off until you set a token.

Post-Installation

Go to Configuration, System, CronWatch (/admin/config/system/cronwatch) to choose where alerts go and send a test alert. The dashboard is at Reports, CronWatch (/admin/reports/cronwatch). A check that runs inside cron cannot notice cron itself not running, so add a system crontab line that runs drush cronwatch:check every five minutes. The permissions are "administer cronwatch" and "view cronwatch dashboard".

Additional Requirements

Drupal 10.3 or newer, or 11, on PHP 8.2 or newer (Drupal 11 needs 8.3). The module stores its data in your site's database (MySQL, MariaDB, Postgres or SQLite) through the CronWatch library, which Composer installs with it.

Drush, for drush cronwatch:check from a system crontab.

Similar projects

Ultimate Cron schedules and logs cron jobs. CronWatch does not schedule anything: it watches the cron you already have and tells you when a run is missed or fails. With Ultimate Cron installed, CronWatch records each of its jobs as a run on that job's own schedule. For jobs to be on time, cron itself must run at least as often as the most frequent job (Ultimate Cron asks for every minute).

Documentation

https://cronwatch.dev/docs/drupal/

Project information

Releases