Understanding and Fixing WordPress Cron Issues with WP Crontrol
Content
If your WordPress site's scheduled tasks—like automatic updates, backups, or subscription renewals—are failing, the problem often lies with the built-in WP-Cron system. The WP Crontrol plugin is an invaluable tool for diagnosing and managing these issues, but it's important to understand what it can and cannot do. This guide will walk you through the most common cron problems and how to resolve them.
Why Are My Cron Events Not Running?
WordPress's default cron system is 'visitor-driven.' This means it only checks to see if a task is due whenever someone visits your site. If your site has low traffic, critical events like backup or subscription renewals might not run on time. WP Crontrol provides an interface to view and manage these events, but it does not change this fundamental behavior.
A more significant issue occurs when the DISABLE_WP_CRON constant is enabled. You might add define('DISABLE_WP_CRON', true); to your wp-config.php file to stop cron from running on every page load, which can improve performance on high-traffic sites. However, this completely disables WordPress's internal mechanism for spawning cron events. If you do this, you must set up a real server cron job (e.g., via cPanel) to call wp-cron.php regularly (e.g., every 5, 15, or 30 minutes). WP Crontrol will display a notice ("The DISABLE_WP_CRON constant is set to true. WP-Cron spawning is disabled.") to alert you of this, but it will not set up the server cron for you.
Common Problems and Solutions
- Problem: Automatic updates or backups are not working, even after deactivating WP Crontrol.
Solution: WP Crontrol itself does not change cron behavior. The issue is likely unrelated to the plugin. Try deactivating and reactivating your backup or update plugin to reset its settings. Use WP Crontrol's Tools → Cron Events screen to check if the plugin's cron events are present and scheduled correctly. - Problem: I've set up a server cron job, but events in WP Crontrol are listed in the past.
Solution: This is normal. The 'Next Run' time is calculated when the page loads. If your server cron is set to run every 30 minutes, the 'Next Run' time will always be in the past until the next time the cron job executes. As long as the server cron is configured correctly, the events will fire. - Problem: I need a cron event to run at a specific interval, but my site has no visitors.
Solution: WP Crontrol cannot force events to run without traffic. You must disable the visitor-driven system by settingDISABLE_WP_CRONtotrueand replace it with a server-level cron job. This is the only way to ensure events run precisely on schedule regardless of site traffic. - Problem: I don't see a specific cron event hook listed in WP Crontrol.
Solution: Some plugins schedule 'single events' that run once and then are automatically deleted. If you check the cron events list after the event has run, it will no longer be visible. Other events are specific to a site on a Multisite network; you must network activate WP Crontrol and check the Cron Events screen for each individual site. - Problem: I changed a cron event's schedule, but the 'Next Run' time didn't update.
Solution: Changing the recurrence (e.g., from daily to hourly) does not automatically change the next time it is scheduled to run. You must also edit the 'Next Run' date and time for the new schedule to take effect immediately.
What WP Crontrol Does Not Do
It's crucial to understand the limits of the plugin:
- It is not a replacement for WP-Cron.
- It does not bypass the
DISABLE_WP_CRONsetting. - It does not automatically run events without site traffic or a server cron.
- It does not provide a log of past cron events that have already run.
- It does not change the user context; all cron events run without a logged-in user, with full access to WordPress functions.
By using WP Crontrol to inspect your scheduled events and understanding the relationship between WordPress and server-level cron jobs, you can effectively troubleshoot and resolve most scheduling issues on your site.
Related Support Threads Support
-
True Cron – Is this plugin still useful?https://wordpress.org/support/topic/true-cron-is-this-plugin-still-useful/
-
Changing schedule for core tasks has no effect (may be new in 1.19)https://wordpress.org/support/topic/changing-schedule-for-core-tasks-has-no-effect-may-be-new-in-1-19/
-
If i reschedule an event to run ones in a week will it be reverted?https://wordpress.org/support/topic/if-i-reschedule-an-event-to-run-ones-in-a-week-will-it-be-reverted/
-
How can I create a log of all cron jobshttps://wordpress.org/support/topic/how-can-i-create-a-log-of-all-cron-jobs/
-
Possible to monitor server side executed cron jobs?https://wordpress.org/support/topic/possible-to-monitor-server-side-executed-cron-jobs/
-
WP-Cronhttps://wordpress.org/support/topic/wp-cron-20/
-
Cron Events Page lists hundreds of past cron eventshttps://wordpress.org/support/topic/cron-events-page-lists-hundreds-of-past-cron-events/
-
High CPU Usage when plugin is activatedhttps://wordpress.org/support/topic/high-cpu-usage-when-plugin-is-activated/
-
Interaction with visitor-based-Cron triggershttps://wordpress.org/support/topic/interaction-with-visitor-based-cron-triggers/
-
pagination and select allhttps://wordpress.org/support/topic/pagination-and-select-all/
-
Allow to sort cron event table by any column + Maintain sorting during filteringhttps://wordpress.org/support/topic/allow-to-sort-cron-event-table-by-any-column-maintain-sorting-during-filtering/
-
List PHP events before updatinghttps://wordpress.org/support/topic/list-php-events-before-updating/
-
listing of cron events already run and using a server based cronhttps://wordpress.org/support/topic/listing-of-cron-events-already-run-and-using-a-server-based-cron/
-
All the cron jobs in the past..https://wordpress.org/support/topic/all-the-cron-jobs-in-the-past/
-
Use and deactivate?https://wordpress.org/support/topic/use-and-deactivate/
-
I have disabled automatic cronjobs, can I run them only with your plugin ?https://wordpress.org/support/topic/i-have-disabled-automatic-cronjobs-can-i-run-them-only-with-your-plugin/
-
Prefer version 1.3.1https://wordpress.org/support/topic/prefer-version-1-3-1/
-
Effect of moving to real server cron?https://wordpress.org/support/topic/effect-of-moving-to-real-server-cron/
-
scheduler disabledhttps://wordpress.org/support/topic/scheduler-disabled/
-
Can WP control help with missing auto updates on staging page?https://wordpress.org/support/topic/can-wp-control-help-with-missing-auto-updates-on-staging-page/
-
disqus cron job dsq_sync_forum not show in the listhttps://wordpress.org/support/topic/disqus-cron-job-dsq_sync_forum-not-show-in-the-list/
-
Schedule adjustments to drop CPU Usage?https://wordpress.org/support/topic/schedule-adjustments-to-drop-cpu-usage/
-
Multisite usehttps://wordpress.org/support/topic/multisite-use-4/
-
what happens if i disable the plugin?https://wordpress.org/support/topic/what-happens-if-i-disable-the-plugin-2/
-
Replace wp-cron with cron jobhttps://wordpress.org/support/topic/replace-wp-cron-with-cron-job/
-
Clarification on “Security Hardening” in 1.16.2 Updatehttps://wordpress.org/support/topic/clarification-on-security-hardening-in-1-16-2-update/
-
Can I safely disable_wp_cron?https://wordpress.org/support/topic/can-i-safely-disable_wp_cron/
-
Should I disable default wp-cron.php by modifying wp-config.php first?https://wordpress.org/support/topic/should-i-disable-default-wp-cron-php-by-modifying-wp-config-php-first/
-
disable wp-cron for page loadhttps://wordpress.org/support/topic/disable-wp-cron-for-page-load/
-
WP-Cron spawning is disabledhttps://wordpress.org/support/topic/wp-cron-spawning-is-disabled-2/
-
Cron job user/auth contexthttps://wordpress.org/support/topic/cron-job-user-auth-context/
-
Is it supposed to run crons if DISABLE_WP_CORON is true ?https://wordpress.org/support/topic/is-it-supposed-to-run-crons-if-disable_wp_coron-is-true/
-
Database activityhttps://wordpress.org/support/topic/database-activity/
-
multi events not shownhttps://wordpress.org/support/topic/multi-events-not-shown/
-
Does this plugin work with real cron?https://wordpress.org/support/topic/does-this-plugin-work-with-real-cron/