WordPress.org

Ideas

Missed Schedule Post Retry

  1. mattgates
    Inactive

    Why is it that when WordPress misses a post, it just says "Missed Schedule" instead of retrying until the post is actually published?

    I do care to an extent that it wasn't published on time, but it bothers me even more when I rely on WordPress to publish a post I scheduled, and I check to make sure it was published hours later, or even the next day, only to find out that my post didn't go out on time, or at all, for the matter.

    If WordPress retried and published within the next 5 to 10 minutes after it missed the scheduled post, I really wouldn't be too upset about it.

    But instead of making sure the task was complete, WordPress simply gives up. I'm sure it would be fairly easy to check to see that a post "missed schedule" and just to publish it ASAP.

    Please consider implementing this feature for WordPress to try and publish at least 2-3 times (or this can be turned into a Setting of X amount of times) upon a "Missed Schedule".

    Thanks!

    Posted: 1 year ago #
  2. Because that would crash your server in many cases.

    This is a basic way of how WP-cron works though.

    It only runs when someone visits the site, and if no one does, and 'enough' time passes, it will flag a post or event as a failure rather than reschedule.

    The fix would be to trigger wp-cron externally (say every 5-10 minutes) to force it to post.

    Posted: 1 year ago #
  3. Jory Hogeveen
    Inactive

    12345

    "and 'enough' time passes".

    This sometimes happens even within minutes.

    We have a actual cronjob running aswell so every 15 minutes the WP cron gets triggered.

    Still WP fails to schedule the post.

    I think it's a pretty neat idea to retry publishing.

    Posted: 1 year ago #
  4. Fails to schedule or fails to post ON schedule? Those are different things...

    Posted: 1 year ago #
  5. Jory Hogeveen
    Inactive

    12345

    It fails to post ON schedule. Marking a post for future publishing works fine, only problem is that it doesn't publish.
    Can't find a reference to the "failed" status in the codebase so far.

    Posted: 1 year ago #
  6. What's your cron-job look like? Because an every 15 minute check should be fine.

    Posted: 1 year ago #
  7. mattgates
    Inactive

    The only way I was able to resolve this issue was by installing this plugin:

    ByREV Fix Missed Schedule Plugin
    https://wordpress.org/plugins/missed-schedule-wordpress-plugin-fix/

    Since I installed this plugin, 3 months ago, there has been a 100% publish rate for the time the post was scheduled to go out.

    I'm not sure why I need a plugin to make sure that my posts have been published at the time they are scheduled to go out and it hasn't yet been implemented into WordPress.

    I schedule a post for a certain time, I expect it to go out at that scheduled time. Not a minute sooner, not a minute later, not an hour later, and definitely not never.

    If it fails, why does WordPress tell me that it failed? It doesn't offer me any reason why it failed nor do I care that it failed.

    I would expect WordPress to know that if the post hasn't published at the scheduled time, it would try again and try again until that post has been published. If there is a serious issue, than I expect it to let me know the details. I just want to know that WordPress is doing its job of publishing my post for the time I scheduled it to be published.

    Telling me it failed does not help me at all. All that did was make me upset that WordPress did not do its job and that its scheduling feature did not work.

    I have visitors to the site throughout the day so I know the wp-cron job that gets triggered when people visit is being called.

    The logic is simple:

    If scheduled post failed to publish and the scheduled date is past, than attempt to publish the post until the status of the post is written in the database as having been successfully published.

    Posted: 1 year ago #
  8. Jory Hogeveen
    Inactive

    12345

    @Ipstenu.

    The cron itself is simply a curl to the wp-cron.php file.
    curl -s -S "http://www.website.domain/wp-cron.php"
    It's set to run every 15 minutes.
    */15 * * * *

    The cron works (100% sure) since all tasks are executed.
    The only thing is that the scheduled posts are set to "failed" instead of "publish"

    Posted: 1 year ago #
  9. Ah!

    Try changing this:

    curl -s -S "http://www.website.domain/wp-cron.php"

    To this:

    wget -q -O - http://yourwebsite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

    The wget with a dev-null will be a little faster, and triggering the doing_wp_cron may be what's lacking here.

    Also make SURE you have define('DISABLE_WP_CRON', true); in your wp-config.php, otherwise weird things happen.

    Posted: 1 year ago #
  10. Jory Hogeveen
    Inactive

    12345

    Thank you!
    We'll give that a try and reply here.

    define('DISABLE_WP_CRON', true); is set, so that wasn't the problem.

    Posted: 1 year ago #

RSS feed for this topic

Reply »

You must log in to post.

  • Rating

    12345
    2 Votes
  • Status

    This is not a core suggestion