- WP-Cron is not a true scheduler. It only fires when someone visits the site, so a quiet site runs nothing.
- Full-page caching makes it worse: cached visits never reach PHP, so nothing starts the queue.
- The fix has two parts: disable WP-Cron in wp-config.php, and add a server cron job that runs the queue every five minutes.
- On WooCommerce, a stalled queue means unsent order emails, stock that is never released and subscriptions that do not renew.
- Check the queue with
wp cron event list --due-now. Anything overdue by hours confirms the diagnosis.
Why does WordPress miss scheduled tasks?
Because WP-Cron, WordPress's built-in task runner, only runs when someone loads a page. No visitors means nothing runs, so a task set for 3am on a quiet site may wait hours for the first visit. The fix is to disable WP-Cron and let the server's own clock run the queue every few minutes.
| WP-Cron | Server cron | |
|---|---|---|
| Triggered by | A page load | The operating system clock |
| Runs on a site with no traffic | No | Yes |
| Runs when pages are cached | No | Yes |
| Accuracy | Whenever someone happens to visit | To the minute |
| Cost per run | Delays the visitor who triggered it | A separate background process |
Every row favours server cron. On a production site, WP-Cron is never the better option.
Caching turns a small problem into a total one
With full-page caching, most visits never reach PHP, so WP-Cron never gets called. Scheduled tasks often stop the week caching is switched on, and nobody connects the two.
How do I check whether WP-Cron is working?
WP-CLI (WordPress's command-line tool) answers this in one command. Anything in --due-now that should have run hours ago means the queue is stalled, not just busy.
cd /var/www/example.com
# Everything scheduled, with next run times
wp cron event list
# Only what is overdue right now
wp cron event list --due-now
# Is WP-Cron even reachable?
wp cron test
# Run the whole queue by hand and see what happens
wp cron event run --due-now
# Registered schedules (hourly, twicedaily, daily, plus plugin ones)
wp cron schedule listwp cron test checks the site can call its own wp-cron.php. It fails on servers that cannot resolve their own hostname.# Does the endpoint respond at all?
curl -sI https://example.com/wp-cron.php?doing_wp_cron
# Is it disabled in wp-config.php?
grep -i 'DISABLE_WP_CRON\|ALTERNATE_WP_CRON' wp-config.php
# Read the queue straight from the database
wp db query "SELECT option_value FROM wp_options WHERE option_name='cron'" \
| head -c 2000| Symptom | Almost certainly |
|---|---|
| Scheduled posts stay in "Missed schedule" | The queue is not running at all |
| Order emails arrive hours late, or in bursts | Only running when a visitor happens to arrive |
| Backup plugin skipped last night | No overnight traffic to trigger it |
| Stock stays reserved after an abandoned checkout | WooCommerce cleanup tasks are not firing |
| Everything runs, but the site feels slow at random | WP-Cron is running inline and delaying visitors |
The last row is the other failure: WP-Cron works, but makes a visitor wait for it.
How do I replace WP-Cron with a server cron job?
Two steps. Turn off the page-load trigger in wp-config.php, then have the operating system run the queue on a fixed schedule. Every five minutes suits almost every site.
// Add above the line that says "That's all, stop editing!"
define('DISABLE_WP_CRON', true);# Edit the crontab for the user that owns the site
sudo crontab -u www-data -e
# Preferred: WP-CLI, no HTTP request involved
*/5 * * * * cd /var/www/example.com && /usr/local/bin/wp cron event run --due-now --quiet
# Alternative: call the endpoint over HTTP
*/5 * * * * curl -sS -o /dev/null https://example.com/wp-cron.php?doing_wp_cron
# Confirm it is installed
sudo crontab -u www-data -lUse the site's own user, not root
WP-CLI run as root creates root-owned files in your web root, which the web server then cannot write to. WP-CLI warns and refuses by default. Use crontab -u www-data -e, or whichever user owns the site. See Linux file permissions for web servers.
# Is cron executing the job?
grep CRON /var/log/syslog | tail -20 # Debian / Ubuntu
sudo journalctl -u crond --since '1 hour ago' # RHEL family
# Should be empty a few minutes after each run
wp cron event list --due-now
# Log the output so you can see failures
*/5 * * * * cd /var/www/example.com && /usr/local/bin/wp cron event run --due-now \
>> /var/log/wp-cron.log 2>&1What breaks on WooCommerce when cron stalls?
More than most people expect. WooCommerce runs much of its background work through Action Scheduler, a job queue that WP-Cron starts. When the queue stalls, the shop keeps taking orders but quietly fails to finish them.
| Task | What customers see when it stalls |
|---|---|
| Order confirmation emails | No confirmation, followed by a support ticket |
| Stock release after a failed payment | Products showing out of stock that are not |
| Subscription renewals | Renewals never charged, revenue quietly lost |
| Abandoned cart cleanup | The database grows and admin pages slow down |
| Product feed and stock sync | Marketplace listings drift out of date |
| Scheduled sale prices | A sale that starts or ends on the wrong day |
Rows one and three cost the most, and both fail silently.
# Overall queue health
wp action-scheduler status
# Anything stuck as pending long past its date
wp action-scheduler action list --status=pending --per_page=20
# Run the queue by hand
wp action-scheduler run
# Clear out completed and failed records: this table gets very large
wp action-scheduler clean --batch-size=1000
# How big has it grown?
wp db query "SELECT COUNT(*) AS actions FROM wp_actionscheduler_actions"No command line? WooCommerce, Status, Scheduled Actions shows the same queue. Thousands of Pending entries with past dates mean cron has not been running. If the queue runs but slowly, the limit is usually the database or CPU, not the schedule. Troubleshooting high CPU and memory on WordPress helps you find which, and safely trimming a large WooCommerce database covers the table growth behind it.
How often should the cron job run, and what if it overlaps?
Every five minutes suits almost every site. Every minute is worth it for a busy shop where order emails should arrive almost at once. Anything slower than fifteen minutes starts to feel broken to a customer waiting for a confirmation.
| Interval | Suits | Trade-off |
|---|---|---|
| */1 * * * * | Busy shops, near-instant emails | More background load, rarely a problem |
| */5 * * * * | Almost every site | The sensible default |
| */15 * * * * | Low-traffic brochure sites | Customers may notice the delay on a form |
| 0 * * * * | Nothing time-sensitive at all | Too slow for anything transactional |
Start at five minutes. Move to one only if something clearly needs it.
# flock stops a second run starting while the first is still going
*/5 * * * * /usr/bin/flock -n /tmp/wpcron-example.lock \
/bin/sh -c 'cd /var/www/example.com && /usr/local/bin/wp cron event run --due-now --quiet'-n means give up at once rather than wait. Without it, a run that takes eight minutes on a five-minute schedule piles up PHP processes until the site returns 502 errors.A managed host should handle this for you. On G7Cloud, each WordPress site's container runs its scheduled tasks itself every five minutes, so quiet and heavily cached sites keep their queues moving. See how our WordPress hosting works.
Frequently asked questions
Why are my WordPress scheduled posts missing their schedule?
Because WP-Cron only fires when someone loads a page. A post scheduled for 3am on a site with no overnight visitors waits for the next visit. Full-page caching makes it worse, since cached visits never reach PHP. Replace WP-Cron with a server cron job.
Should I disable WP-Cron?
Yes, on any production site, but only as half of the change. Set define('DISABLE_WP_CRON', true); in wp-config.php and add a server cron job that runs the queue every five minutes. Disabling it without the cron job stops every scheduled task on the site.
What is the difference between WP-Cron and Action Scheduler?
WP-Cron is WordPress's own scheduler, started by page loads. Action Scheduler is a job queue that WooCommerce and many plugins use for background work, and WP-Cron starts it. If WP-Cron stalls, Action Scheduler stalls with it.
How often should the WordPress cron job run?
Every five minutes for most sites. Every minute for a busy shop where order confirmations should arrive at once. At that frequency, use flock so a slow run cannot overlap the next one and use up your PHP workers.
Is WP-CLI or curl better for the cron job?
WP-CLI. It runs PHP directly with no HTTP request, so caching, firewalls and TLS cannot interfere. Use curl only where there is no WP-CLI or shell access.
Why do my WooCommerce order emails arrive late?
Usually a stalled scheduler. WooCommerce queues most emails rather than sending them during checkout, so if nothing processes the queue they wait until a visitor starts it. Check WooCommerce, Status, Scheduled Actions for pending items with past dates.
About G7Cloud Engineering
Articles written by the engineers who build and run G7Cloud: UK managed hosting and the AI Website Builder. We write about what we operate every day: containers, backups, databases, and the small-business websites that run on them.
More about G7Cloud →