WordPress Cron Explained: Why Scheduled Tasks Fail and How to Fix Them
WP-Cron runs scheduled posts, backups and emails, but it depends on visitors. Learn how it works, why it misfires and how to switch to a real server cron job.
Scheduled posts that fail to appear, backups that never run, emails that go out hours late: these are classic symptoms of a misbehaving WordPress scheduler. WordPress has its own task scheduler, called WP-Cron, and it works differently from the cron system on a server. Understanding that difference lets you make scheduled tasks reliable.
What WP-Cron does
WordPress and its plugins schedule many background jobs: publishing scheduled posts, checking for updates, clearing expired data, sending queued emails, running backups, syncing data with external services and processing shop tasks. These are registered as events with a time and a hook. WP-Cron is the mechanism that checks which events are due and runs them.
How it actually works
A traditional server cron runs at fixed times whether anyone visits the site or not. WP-Cron does not. It is triggered when someone loads a page. On each page load, WordPress checks whether any scheduled event is due, and if so, it starts a background request to run it.
This has two consequences:
- Quiet sites run tasks late. If nobody visits for hours, due tasks wait until the next visitor arrives. A post scheduled for 9:00 may publish at 9:47.
- Busy sites do unnecessary checking. Every request does a small amount of work to see whether tasks are due, and several simultaneous requests can compete to run the same job.
Common reasons scheduled tasks fail
Low traffic
As above, no visits means no trigger. Caching can make this worse if cached pages are served without ever loading WordPress.
Loopback requests blocked
WP-Cron works by making a request from your site back to itself. Password protection, a firewall, a maintenance mode plugin or a broken SSL setup can block that request. Site Health in the dashboard reports loopback problems.
Long-running or crashing jobs
If a task takes longer than the PHP time limit or runs out of memory, it stops and may be retried repeatedly, blocking other jobs.
Cron disabled without a replacement
Some people set DISABLE_WP_CRON to true after reading performance tips, but forget to add a server-side cron job. Then nothing runs at all.
Overloaded schedules
Plugins that schedule hundreds of events, or leave a backlog of stuck ones, can slow the scheduler to a crawl.
How to see what is scheduled
A cron management plugin shows all scheduled events, their next run time and the hook they call, and lets you run or delete them. If you use WP-CLI over SSH, you can list events and run due ones:
wp cron event list
wp cron event run --due-now
Look for events that are long overdue, duplicated many times or tied to plugins you have removed.
Replacing WP-Cron with a real cron job
For reliable timing, let the server trigger the scheduler at fixed intervals and tell WordPress not to do it on page loads.
- Add this to
wp-config.php:define( 'DISABLE_WP_CRON', true ); - In your hosting control panel, open the scheduled tasks or cron jobs section. In Plesk, this is the Scheduled Tasks tool for the subscription.
- Create a task that runs every few minutes. A common choice is to run WP-CLI, for example
wp cron event run --due-nowin the site directory, or to requesthttps://example.com/wp-cron.php?doing_wp_cronusing a command-line tool. - Check after a day that scheduled posts and plugin tasks run on time.
Choose an interval that suits you. Every five minutes is usual; a shop that sends order emails from a queue may want it more often.
Troubleshooting checklist
- Open Tools, Site Health and read any warnings about loopback requests or scheduled events.
- Temporarily disable maintenance, security or password-protection plugins and see whether events start running.
- Check the error log for fatal errors during cron runs.
- Remove events from plugins you deleted.
- Make sure the server time zone and the WordPress time zone setting are correct, since mismatches cause apparent delays.
- Confirm that your host allows scheduled tasks and outgoing loopback connections on your plan.
Cron and caching
Full-page caches and CDNs can answer visitors without touching WordPress, which reduces the chance of triggering WP-Cron. Another reason a real cron job is useful on cached sites: the schedule no longer depends on uncached traffic.
Cron and email queues, backups and shops
Many background jobs have real business impact: abandoned cart emails, subscription renewals, stock syncs, order status updates and scheduled backups. If your site depends on them, monitor that they run. Some plugins display a last-run time; check it occasionally, or set a simple alert when the schedule falls behind.
Cleaning up a messy schedule
If the event list shows hundreds of entries for the same hook, something is scheduling jobs faster than they run. Find the plugin responsible, update or remove it, and then delete the duplicates. Check again a day later to confirm the backlog does not return. A tidy schedule makes both the visitor-triggered and the server-triggered methods more reliable.
Cron on Zebra Hosting
Plesk includes a scheduled tasks tool, so you can create real cron jobs for your WordPress site without extra software. Our WordPress hosting plans are ready within minutes of payment, and larger shops that need more control can move to a VPS.