WordPress notes
External cron jobs for WordPress, the right way
Quick answer
WP-Cron runs scheduled tasks only when someone visits the site, so on quiet or fully cached sites tasks run late or not at all. Set DISABLE_WP_CRON to true in wp-config.php, then have your server or host call wp-cron.php, or run WP-CLI's cron command, every five to fifteen minutes. Check the schedule with WP-CLI afterwards.
On this page
Why WP-Cron misses tasks
WordPress has no background process of its own. On each page load it checks whether any scheduled task is due and, if so, starts it. On a busy site that works. On a quiet site, or one where a page cache answers most visits before WordPress runs, due tasks wait until the next uncached visit. Share count refreshes, scheduled posts, backups and email digests all depend on this. The old post on this domain about using external cron jobs was written because share counts stopped updating for exactly this reason.
Set up a real cron job
Disable the visit trigger
Add
define( 'DISABLE_WP_CRON', true );towp-config.php, above the line that says to stop editing.Choose a schedule
Every 5 to 15 minutes suits most sites. More often wastes resources.
Add the job
In your host's cron panel or crontab, call the cron endpoint or WP-CLI (examples below).
Verify
Run
wp cron event listand confirm the next run times move forward.
# crontab: call wp-cron.php every 15 minutes
*/15 * * * * curl -s https://example.com/wp-cron.php?doing_wp_cron > /dev/null 2>&1
# or, with shell access, use WP-CLI
*/15 * * * * cd /path/to/site && wp cron event run --due-now > /dev/null 2>&1Choosing between the two
| Method | Pros | Cons |
|---|---|---|
| HTTP call to wp-cron.php | Works on any host with a cron panel | Goes through the web server and its timeouts |
| WP-CLI on the server | No web timeouts, runs as a process | Needs shell access and WP-CLI |
| Host's built-in scheduler | No setup | Check the interval it uses |
Check tasks are healthy
wp cron event listshows every scheduled hook and when it next runs.- Hooks with next-run times in the past mean cron is not running.
- Site Health in the dashboard warns when scheduled events are late.
Questions
Should I disable WP-Cron?
On low-traffic or heavily cached sites, yes, as long as you replace it with a real cron job.
How often should WordPress cron run?
Every 5 to 15 minutes is enough for most sites.
How do I know cron is working?
Run wp cron event list and check that next-run times are in the future and advancing.
Hannah Voss, Editor. Checks every guide against a working WordPress install and the networks' current documentation. Last reviewed September 2026.
Related guides
- Share count not updating or not accurate: a fix listShare counts stuck, stuck at zero or wrong? Work through tokens, caches, cron, URL variants and rate limits in order, and why you should never add fake shares.3 min read
- Plugin troubleshooting: what to try firstTroubleshoot a WordPress plugin problem in a safe order: caches, conflicts, debug logging, recovery mode, and disabling a plugin when the admin is down.3 min read
- Fixing the get_currentuserinfo() is deprecated noticeWhat the get_currentuserinfo() is deprecated notice means, how to find the plugin or theme calling it, and the one-line fix using wp_get_current_user().3 min read