WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My future posts are getting "missed". They are not getting published on the time they should, and it says "Missed Schedule".

I read somewhere that it could be a server issue, so how can I fix it?

share|improve this question
Try the Missed Schedule plugin. – hsatterwhite Mar 31 '11 at 23:53
I found a plugin that was recently updated and used that. wordpress.org/extend/plugins/wp-missed-schedule Since there was only a small code, I didn't install the pluging, but used the code in my functions-file. – Martin-Al Apr 2 '11 at 19:45
up vote 0 down vote accepted

Added the following to my theme's functions.php:

define('WPMS_DELAY', 5);  // Run the below cron task every X minutes
define('WPMS_OPTION', 'wp_missed_schedule');

function wpms_replacements_deactivate() {
register_deactivation_hook(__FILE__, 'wpms_replacements_deactivate');

// Run the following code on every request
function wpms_init() {
    remove_action('publish_future_post', 'check_and_publish_future_post');
    $last = get_option(WPMS_OPTION, false);

    // Exit here if less than WPMS_DELAY minutes has passed since we last ran
    if (($last !== false) && ($last > (time() - (WPMS_DELAY * 60))))

    // Find all posts whose scheduled time has passed and publish them
    update_option(WPMS_OPTION, time());
    global $wpdb;
    $scheduledIDs = $wpdb->get_col("
        SELECT `ID` FROM `{$wpdb->posts}`
        WHERE (
          ((`post_date` > 0) && (`post_date` <= CURRENT_TIMESTAMP()))
          OR ((`post_date_gmt` > 0) && (`post_date_gmt` <= UTC_TIMESTAMP()))
        AND `post_status` = 'future'
        LIMIT 0, 10
    if (!count($scheduledIDs)) 
    foreach ($scheduledIDs as $scheduledID) {
        if (!$scheduledID) continue;
add_action('init', 'wpms_init', 0)
share|improve this answer
Could you explain what this actually does? – Vince Pettit Apr 10 '13 at 10:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.