Fix the WordPress ‘Missed Schedule’ Error

Many people have noticed that with some of the newer versions of WordPress the scheduled posts feature has not been working.  Rather than publishing the scheduled post on time it simply displays the post in the backend with the message “Missed Schedule.”  If this is happening to you then I’ve got a very simple solution for you.

WordPress 2.9 has more features and as such it carries a heavier load on servers.  As a heavier program, it sometimes times out before accomplishing the actual task of publishing your post.

Some systems would start the publish process and then not respond in the 1/100th of a second that WordPress allows it to wait before it would timout.  By changing the timeout time to 1 second or even longer people have been able to fix it.

To fix the issue simply locate the WordPress file named cron.php and locate the line of code that should be at or around line 232.  Look below to see the their code compared to our modified code.  We’re simply allowing a full second for the process to begin before timing out the publish feature.

I made that change and it has worked great for me.  I’ve had no issues.

And remember to always be sure to backup both your database and your files before updating WordPress to the newer versions.

230.
231.  $cron_url = get_option( 'siteurl' ) . '/wp-cron.php?doing_wp_cron';
232.  wp_remote_post( $cron_url, array('timeout' => 0.01, 'blocking' => false, 'sslverify' => apply_filters('https_local_ssl_verify', true)) );
      wp_remote_post( $cron_url, array('timeout' => 1, 'blocking' => false, 'sslverify' => apply_filters('https_local_ssl_verify', true)) );
233.  }
234.
235.  /**

Share your Opinion

and be a part of the discussion

  1. *Name (no keywords)

    *Mail

    Website

    * Indicates Required Fields
    Your Comment


25 Vibrant Comments

We would love to hear yours!


  1. January 2, 2010

    Eric B. said:

    That looks like it could work. I’m just going to try out WordPress 2.9.1 RC1 and see how that goes, first.

    I think the true problem wasn’t really the timeout for the cron job, but something to do with cURL screwing up, with an effect on the cron jobs.

    But this isn’t really a “fix” but more of a workaround. But if it works, then that’s fine. It’s great that you found that.
    My Latest Blog Post: Automatically Update Your Copyright Date


  2. January 2, 2010

    Keith said:

    I upgraded a couple of weeks ago and it erased my database, I had to start from scratch. Luckily I had just uploaded my design and installed WP and about 10 plugins, so I only lost a couple hours of work (reminded me to go backup my other sites!) and I haven’t messed with it since due to holiday travel schedule and other things I am working on, I decided to wait a little bit before trying to figure out what the problem was.

    Glad it worked for you…
    My Latest Blog Post: Working On Theme…


    • January 4, 2010

      Nicholas Cardot said:

      Keith » I’ve been hearing that a lot of people had a lot of big issues with this one. I feel bad to hear that. Always be sure to backup your site before upgrading. It can save a lot of hassle.


  3. January 2, 2010

  4. January 3, 2010

    Aminul Islam Sajib said:

    I have not been using the scheduled post feature in my wordpress, so I haven’t experienced any problem so far. However, if the problem exists, it’s really bad. Because post schedule is one of the best features of wordpress and other engines such as blogger (though I don’t like that at all).
    My Latest Blog Post: CONTEST: Valentine’s Day Top Commentator Contest


  5. January 3, 2010

    Deepika said:

    Me too faced this situation. I scheduled one of my post on Jan 1st.. But it was miss scheduled and it automatically posted on Jan 2nd…

    There was two similar post in these two days in my blog.. Then i rectified that problem.. Now i came to know the reason for it.. Definitely i will use it.. Hereafter there wont be any miss scheduled post
    My Latest Blog Post: New Year Resolution Of My Blog Innovate Yourself


  6. January 3, 2010

    David Hobson said:

    Thanks for sharing, this has been annoying me for ages.
    My Latest Blog Post: 8 Extensions For Google Chrome Browser


  7. January 9, 2010

    jess said:

    I thought it was me that had this problem, because of that I stop using the scheduled post and did it manually, sure it nice seeing this post.
    My Latest Blog Post: Israel Kamakawiwo’ole


  8. January 11, 2010

    Don Gilbert said:

    I had a site powered by WP-Robot. Nothing was working because I had upgraded it to 2.9. None of my scheduled posts would run and I would have to go in and manually run the add new posts function of WP-Robot. Kind of defeated the “Robot” part.

    I’m glad 2.9.1 fixed it though.
    My Latest Blog Post: Top 10 Tips to Dominate Your Niche for SEO


  9. January 11, 2010

    Tessa Shepperson said:

    Hi, I have had this problem, and very annoying it is too. I would love to fixe it.

    I have had a look at my WP files via my ISP file manager. I have found a file called WP-cron.php but it is fairly short and does not seem to have the code you mention. Am I looking in the wrong place?

    Any help would be very much appreciated.


  10. February 7, 2010

    Mikkel 'DaneBlogger' Juhl said:

    I have had this problem before, I just reinstalled and then it worked. This just seems to be a lot less work, thanks for sharing!
    My Latest Blog Post: How to Increase Your Productivity in 8 Easy Steps


  11. January 9, 2011

    Rainy said:

    Excellent article!

    Just sharing my experiences with the “missed schedule” annoyance.

    My first scheduled post was missed. After a little digging, I discovered the time in general settings was completely off so I changed it to reflect my local time. I ran a test scheduled to post in five minutes and it worked beautifully.

    So, I set up my next queue of posts. I logged in to the control panel thirty minutes before the next post was supposed to publish and I already had a missed schedule notification. Checked the time settings and it was still okay.

    I waited it out, and right on the dot, it published.

    A few observations:

    The time displayed in general settings and that of my local time was off by about three minutes. Now today, it’s correct down to the second.

    I’m assuming the reason I’m still receiving a missed schedule notice is a stuck cron job. However, I’m hesitant to fix this because, in the end, it IS working now, right on time. And you know what they say about fixing things that aren’t broken. Or, in this case, duct taped together :)

    Hope everyone is able to solve their missed schedule conflicts, because it is one of the best features on any blogging system, in my opinion.

    //Rainy
    My Latest Blog Post: Cache-ing In- Why Your Fresh Content Should be Frozen