How to troubleshoot WP-CRON failure

WP Cron is WordPress internal mechanism for scheduling tasks.  It has nothing to do with Linux cron.  Linux cron is activated by an actual operating system scheduler.  WP cron is activated every time someone visits your site and then it checks a listing of jobs to see who should get executed.

Plugins can insert wp cron jobs.  Even once the plugin is removed, it’s cron job might still be stored in wp-options.  If it can’t fire, some times it will tie up the wp cron system.  If you’ve had too many plugins in your site’s history and wp-cron is not firing scheduled posts for you, this is likely the case.  Here is how you verify if you have a situation:

1)  Install debug bar and debug bar cron plugins

http://wordpress.org/extend/plugins/debug-bar/

http://wordpress.org/extend/plugins/debug-bar-cron/

2) Schedule a post to go off in 5 minutes

3)  From your admin bar, click the Debug botton on the far right and then click the “cron” tab on the far left.  You’ll see your cron jobs and your post scheduled for around 300 seconds out.  If you keep refreshing you can see this count down.

If that 300 goes down to zero and then into negative numbers, you have an issue with wp cron and will likely require developer intervention.  Another work around is to use the plugin:

http://wordpress.org/extend/plugins/wp-missed-schedule/

This plugin will deal with the fact you have missed posts but your cron system says it is busy.

If you don’t want to schedule a post, you can use this plugin to schedule a “do nothing” event in wp-cron.  Activating the plugin schedules the do nothing event and de-activating the plugin removes it.

http://wordpress.org/extend/plugins/wp-cron-oneshot/

If you would like to delete a rogue wp-cron event, this plugin will allow you to do so:

http://wordpress.org/extend/plugins/fff-cron-manager/

Leave a Reply

Your email address will not be published. Required fields are marked *