Monitor WordPress cron health: a plugin that warns you when scheduled tasks stop running
Published Updated 3 min read
WordPress scheduled events fail without a sound. A backup plugin schedules a daily job, the job stops running, and you hear nothing, because the notification email is sent by the job itself. Eleven days later you ask for a restore and find the last backup is almost two weeks old.
This is not a bug; it is how the trigger works. WordPress does not run its cron queue on a timer. It runs it when a visitor loads a page after the scheduled time has passed. A low-traffic site on a quiet night can go hours without a visitor, and a site with DISABLE_WP_CRON set to true and no server cron to replace it can go indefinitely.
A small monitoring plugin breaks the silence. It checks every scheduled event against its next run time, flags the overdue ones on an admin page and in Site Health, and can email the admin when events fall behind. It fixes nothing, but it turns silence into a signal.
A pull system that nobody pulls
WordPress cron is pulled, not pushed. The queue is checked when a page loads, so no visitors during a scheduled window means no event. DISABLE_WP_CRON is meant to be paired with a real server cron calling wp-cron.php on a schedule; if that server cron is missing, misconfigured or lost in a hosting migration, the queue is never processed. The admin looks exactly the same either way.
Most backup and monitoring plugins make it worse by reporting when a job runs. A job that never runs never reports. The UpdraftPlus status page shows the daily backup as scheduled and active whether or not it has ever fired, and nothing in the admin flags the gap.
Overdue by more than one interval
Tools > Cron Health reads the full cron schedule and compares each event's next run time with now. An event whose scheduled time is more than one full interval in the past has missed at least one run and is marked overdue.
The table lists every event with its hook name, schedule (daily, hourly, twicedaily or a custom interval), interval in seconds, next run time and status. Overdue events are red and sorted to the top, events due within fifteen minutes are orange, and everything on schedule is green.
If DISABLE_WP_CRON is true, a warning sits above the table, so the configuration is the first thing you see rather than the last thing you check.
A critical result in Site Health
The plugin also registers a Site Health test that applies the same overdue rule when WordPress runs its background checks. Any missed run returns a critical result naming the affected hooks; otherwise it is green.
The admin page only helps when someone opens it. Site Health puts the result on the dashboard without anyone going looking, which makes it the more reliable of the two on sites where nobody visits Tools > Cron Health.
It sees the schedule, not the run
It can tell you an event is overdue, not why. The cause might be no visitors triggering wp-cron, DISABLE_WP_CRON with no server cron, a plugin that unscheduled an event without rescheduling it, or a job that hit a fatal error and never re-registered.
It cannot catch a job that ran and failed quietly. If a backup started, reached storage, hit an error and exited without reporting, the next timestamp still advances and the status looks healthy.
The daily email alert is itself a scheduled event, so in a total cron outage it will not send either. The admin page and the Site Health check still show the problem, because both run on page load rather than through cron.
What you get
Included
- Admin page listing every scheduled event with overdue, pending, and OK status
- DISABLE_WP_CRON detection and warning displayed before the event table
- Site Health check that surfaces overdue events as a critical issue on the health dashboard
- Daily email alert to the site admin when any scheduled event is overdue
- Automatic cleanup of the scheduled alert event on plugin deactivation
Not included
- Events that ran but failed mid-execution without throwing a catchable error
- Why a specific event is overdue, only that it is
- Rescheduling or restarting missed events, the plugin reports only
- Email alerts when DISABLE_WP_CRON is set and no server cron is configured, since the daily check itself relies on cron
Questions
All my events show overdue. What does that mean?
Usually that the queue is not being processed at all. Check whether DISABLE_WP_CRON is true in wp-config.php and, if so, whether a server cron is calling wp-cron.php on a schedule. On a very quiet site, events can also fall behind simply because no visitor has triggered the queue.
Can it reschedule missed events?
No. It reads the queue and changes nothing. Rescheduling belongs to the plugin that registered the event, or you can run the queue by visiting yoursite.com/wp-cron.php in a browser or with curl.
An event shows overdue but its plugin seems fine. Why?
The check can only see that the next scheduled time is in the past. A job that ran successfully but did not re-register its next run correctly looks overdue even though the last run completed.
Is it safe on a live site?
Yes. The page and the Site Health test are read-only. The only write is scheduling the daily alert on activation, and deactivating the plugin removes that event cleanly.
Build it in Steem
The button opens the builder with this guide's prompt filled in, so you can change anything before it runs. Nothing is built, and nothing is charged, until you send it.
Read the prompt (416 words)
Build a WordPress plugin called WP Cron Monitor. Plugin Name: WP Cron Monitor. Description: Shows scheduled event status on an admin page, adds a Site Health check, and emails an alert when events are overdue. Single PHP file. No external dependencies. Register an admin page under the Tools menu using add_management_page. Page title: Cron Health. Menu title: Cron Health. Capability: manage_options. Slug: wp-cron-health. On the page, display two sections: 1. If the constant DISABLE_WP_CRON is defined and true, display a div with classes notice notice-warning containing a paragraph: 'DISABLE_WP_CRON is active. WordPress will not process scheduled events on page load. A server-level cron job must call wp-cron.php on a schedule, or no events will run.' 2. A table of all scheduled events. Read the cron queue by calling _get_cron_array(). For each Unix timestamp key and each hook at that timestamp, extract the schedule name and interval from the nested array (each entry has schedule and interval keys; single-run events have no schedule and interval 0, show 'once' and '-'). Calculate status: if the timestamp is more than the interval seconds in the past (and interval is greater than 0), the event is overdue; if the timestamp is within 900 seconds in the future, it is pending; otherwise it is OK. Display columns: Hook Name, Schedule, Interval, Next Run (formatted with date('Y-m-d H:i:s', $timestamp)), Status. In the Status column, output 'Overdue' with inline style color:#cc0000 if overdue, 'Pending' with color:#b06000 if pending, and 'OK' with color:#006600 otherwise. Sort rows so overdue appear first, then pending, then OK. Apply classes wp-list-table widefat fixed striped to the table. Register a Site Health check by adding a filter on the site_status_tests hook. Add an async test with id 'wpcm_overdue'. The callback reads _get_cron_array() and checks whether any events with a positive interval are overdue using the same logic above. If any are found, return a result array with status 'critical', label 'Scheduled events are overdue', and a description that lists the overdue hook names. If none are found, return status 'good' and label 'All scheduled events are on track'. On plugin activation using register_activation_hook, schedule a daily event using wp_schedule_event(time(), 'daily', 'wpcm_daily_check'). On plugin deactivation using register_deactivation_hook, call wp_clear_scheduled_hook('wpcm_daily_check'). Add an action for 'wpcm_daily_check'. The callback reads _get_cron_array(), collects all overdue events with positive intervals, and if any are found, sends an email to get_option('admin_email') with subject 'WordPress cron health alert: overdue scheduled events' and a plain-text body listing each overdue hook name and how many seconds overdue it is.
Steem