With the automatic upgrade features in WordPress now, I didn’t give upgrading WP 2.9 a second thought. Unfortunately, the next day Epi alerts me that one of his scheduled 12 Days of Christmas posts had not been published. Imagine my surprise when I went into the Posts area and see the post with a Missed Schedule alert next to it!
Obviously this was pretty surprising, considering it’s not like the post has to catch a bus or drive in traffic (web traffic, wa ha ha~) to arrive on the front page. How could it miss the scheduled time? Even worse, updating the publish time didn’t fix the problem, and the post kept missing deadline after deadline. Did someone tag the post as Jesus159159159 (ok that was mean, but I had to ^__~)? Turns out this has been a bug for a few versions now, and the solution required a quick edit to the core files.
Essentially, the default cron timeout limit is too short and so I had to change a line in wp-cron.php to increase this limit. In my case (WP version 2.9), I changed line 229 from:
wp_remote_post ($cron_url, Array (' timeout' => 0.01, ' blocking' => false));
to:
wp_remote_post ($cron_url, Array (' timeout' => 20, ' blocking' => false));
After I increased the limit to 20 seconds, the post still missed the schedule at first, but after a short while, it published correctly. Hopefully this gets fixed soon, because I don’t want to have to manually edit the core files every time I update. On a semi-related note, I’m liking this WP-Syntax plugin.



{ 4 comments… read them below or add one }
Ahhh, I see. I guess if it’s 0.01, then if the server hiccups, then it may miss it. Like if the server is loading something else maybe? But with 20 seconds, then you have all the time in the world.
I love these posts! They remind me of all those Post-Its in MAGI’s innards.
Yep, I just had the same problem too. Hard to believe they let an obvious bug like this slip through. I’m guessing we’ll see a 2.91 version soon.
Supposedly it’s fixed in 2.9.1, but we’ll see.