WordPress cron problems

I’m having problems with WordPress’ internal cron system. For some odd reason, it seems that WordPress is killing off the process before it is even finished.

I am aware of some kind of fix in wp-cron.php and that I should change the timeout from 0.01 to something else, however this has not helped with the issue.

Read More

My cron job can at times take quite a bit of time and I have tried using the plugin I have created on two different hosts.

Does anyone have any idea of what could be going on? I’m using WordPress 3.0.1
Thanks in advance!

Related posts

Leave a Reply

1 comment

  1. A few things to help troubleshoot.

    It’s only when you start doing strange and weird things like not having DNS setup properly or blocking loopback connections then it will cause you problems. It is possible that certain web hosts are not allowing WordPress cron jobs.

    You can try this:
    In wp-cron.php, you’ll find this code:

    if ( $_GET['check'] != wp_hash('187425') )
        exit;
    

    Comment that out by adding // in front of each line. This disables the check that prevents you from running it manually.

    Next, you will manually run wp-cron.php by calling its address in a browser. If this fails then it is the host.

    You might take a look in the database, using phyMyAdmin or what have you, and see what’s in the wp_options table under the key of “cron”. The content of the value for that field is a big array telling it what actions to perform and when. The trick here is that wp-cron erases those after it has performed them.

    Plus, you have to specify paths not urls in cron jobs.