WP-Cron not running? Why scheduled tasks miss and how to fix it
WP-Cron does not run on a clock. It runs when someone loads a page, so a quiet site can miss scheduled posts and backups without any error. Here is how to find the cause, and how to get an alert when a run is missed.
Updated
Short answer
WP-Cron is only triggered on page load, so tasks run late or not at all when nobody visits, or when something stops the visit from reaching WordPress. The reliable fix is to set DISABLE_WP_CRON, run WP-Cron from a real system cron job, and send a heartbeat ping after it succeeds.
Why WP-Cron misses runs
WordPress checks its list of scheduled tasks on every page load, and runs whatever is due. It does not run constantly the way system cron does. The WordPress developer handbook gives the example of a task scheduled for 2:00 PM when no page loads until 5:00 PM: the task waits for the next visit.
Under the hood, WordPress sends a non-blocking request to wp-cron.php and uses a lock so the same process does not start twice within about a minute. If that request never gets through, nothing runs and nothing is reported.
Two common symptoms are scheduled posts stuck on "Missed schedule" and backup or email plugins that stop at some point without complaint.
Find the cause
| Cause | How to check | Fix |
|---|---|---|
| Low traffic | Tasks run in bursts, only after someone visits | Run WP-Cron from system cron (below) |
DISABLE_WP_CRON set with no replacement | Search wp-config.php for DISABLE_WP_CRON | Add a system cron job, or remove the constant |
Request to wp-cron.php fails | Open /wp-cron.php in a browser or with curl -I. Look for 401, 403, 404 or a timeout | Allow the request through basic auth, firewall or security plugin rules |
| Visits do not reach PHP | A page caching plugin or host cache serves pages without running PHP | Use system cron so the schedule does not depend on visits |
Replace WP-Cron with system cron
First stop WordPress from triggering cron on page loads by adding this line to wp-config.php:
define( 'DISABLE_WP_CRON', true );Then pick one way to run it on a schedule. The WordPress handbook shows requesting wp-cron.php over HTTP with wget --delete-after (without that flag, wget saves the response to a file). WP-CLI avoids the web server altogether and runs every due event directly:
| Method | Command | Notes |
|---|---|---|
| HTTP | wget --delete-after https://example.com/wp-cron.php | Goes through your web server, so firewall and auth rules apply |
| WP-CLI | wp cron event run --due-now | Runs from the site directory as the site user. No HTTP request needed |
WP-CLI is the better choice if you can install it. It does not depend on your web server, firewall or visitors. A request to wp-cron.php only tells you the web server answered.
Ping a heartbeat when it succeeds
System cron fails silently too. Add a heartbeat request after the command, joined with &&. The shell runs the ping only if the command exits with status 0.
*/5 * * * * cd /var/www/example.com/public_html && wp cron event run --due-now && curl -fsS -m 10 --retry 3 https://heartbeat.uptimeio.com/heartbeat/YOUR_HEARTBEAT_TOKEN > /dev/nullIf you use the HTTP method instead, the same pattern works. The -f flag makes curl treat an HTTP error as a failure, so a 403 from a firewall skips the ping:
*/5 * * * * curl -fsS -m 60 https://example.com/wp-cron.php > /dev/null && curl -fsS -m 10 --retry 3 https://heartbeat.uptimeio.com/heartbeat/YOUR_HEARTBEAT_TOKEN > /dev/nullA missing ping then covers all three failures: the job did not run, WordPress could not be reached, or the command failed.
Set it up in UptimeIO
- Create a monitor and choose the Heartbeat type.
- Set the interval to match your cron schedule, for example 5 minutes, and a grace period longer than your slowest run.
- Copy the heartbeat URL into the crontab line above.
- Choose where alerts go: email, Slack, Telegram, Pushover or a webhook.
Heartbeat monitors are on every plan, including Free. A few details worth knowing:
- Intervals: 1 minute to 24 hours, with a grace period of 1 second to 24 hours. The shortest interval is 5 minutes on Free and 1 minute on Pro and Scale.
- Requests: GET or POST, no authentication.
- Incidents: an incident opens when a ping is late, and resolves after 3 on-time pings in a row.
Questions
- Why is WP-Cron not running?
- WP-Cron is only triggered when a page loads. On a low-traffic site, tasks wait for the next visit. It can also fail when the request to wp-cron.php is blocked, when DISABLE_WP_CRON is set without a system cron job replacing it, or when a cache serves pages without reaching PHP.
- What does DISABLE_WP_CRON do?
- Setting it to true in wp-config.php stops WordPress from running WP-Cron on page loads. You then need to trigger wp-cron.php or run wp cron event run --due-now from a system cron job.
- What is ALTERNATE_WP_CRON?
- An alternative cron method that uses a redirection approach, commonly used when scheduled posts are not published on time. The WordPress documentation notes that it carries risks because it relies on a non-native service.
- How do I run all due WP-Cron events from the command line?
- Run wp cron event run --due-now from the site directory with WP-CLI. It runs every hook that is due at that moment.
- How do I get an alert when WP-Cron stops?
- Run WP-Cron from a system cron job and send a request to a heartbeat URL after it, joined with &&. The heartbeat monitor alerts you when the request stops arriving.
Related
- Cron job monitoring - How UptimeIO heartbeat monitoring works and which plans include it.
- Cron job not running - Causes and fixes for crontab and systemd jobs on your own servers.
- Cron expression generator - Build a schedule and preview its next run times.
- Heartbeat monitoring docs - Settings, ping examples, metadata, and rate limits.