Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

My future posts are going 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

2 Answers 2

Try the Missed Schedule plugin.

share|improve this answer
    
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 Aleksander Apr 2 '11 at 19:45
up vote 1 down vote accepted

Added the following to my functions.php:

define('WPMS_DELAY',5);
define('WPMS_OPTION','wp_missed_schedule');
function wpms_replacements_deactivate(){delete_option(WPMS_OPTION);}register_deactivation_hook(__FILE__,'wpms_replacements_deactivate');

function wpms_init(){
    remove_action('publish_future_post','check_and_publish_future_post');
    $last=get_option(WPMS_OPTION,false);
    if(($last!==false)&&($last>(time()-(WPMS_DELAY*60))))
    return;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))return;
        foreach($scheduledIDs as$scheduledID){if(!$scheduledID)continue;wp_publish_post($scheduledID);}}

    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

 
discard

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.