Support » Fixing WordPress » Scheduled Posts do not get published

  • Resolved adrianwackernah

    (@adrianwackernah)


    Hi, I had wp-cron disabled and setup a cron at host for calling wp-cron.php every 15 minutes. But as I changed that back to use default wordpress cron (disabled cron at host and removed setting in config of wp), wp-cron works as I can see with plugin Backwpup which runs every night and creates a backup from database. So wp-cron works. But I had few posts which are set to schedule, but they do not get published at time they should. Even after they do get only a status of failed to publish instead get published later when wp-cron is called again. That is stupid behavior. How do I get it working again?

Viewing 15 replies - 1 through 15 (of 15 total)
  • If I am understanding correctly this could be a server configuration issue. The posts post based on the servers time. So if the server is set to
    London, UK (GMT+1) time and you are wanting the post to go live at 1:00pm Chicago, IL (GMT-5) time it will actually go live 6 hours earlier because of the server time. Some hosts will allow you to change the server time for just your account in the control panel others will not. You may have to just do the time calculations and set the post time/date according to the server time.

    Hope this helps. Once you find a solution please tag the thread as resolved.

    Thread Starter adrianwackernah

    (@adrianwackernah)

    Hi @binarywc,
    I have read about this and yes, my server is set to use Greenwich time but my time is Berlin summertime (+2 hours). But I was wondering because backup plugin uses wp-cron too and it works fine: backup at 3 in the morning and in log I see backup was done at 3 in the morning.

    So you have backup set to run at 2am Berlin time and it runs but posts do not post at the correct time or they do not post at all?

    Thread Starter adrianwackernah

    (@adrianwackernah)

    They do not post at all. After scheduled time is in past I get on scheduled post only message that schedule was in past and text is marked in red.

    Okay, thanks for clarifying. I’ve had this problem before. Give me some time to dig and find the fix for you.

    In the meantime, please install WP Health Check plugin https://wordpress.org/plugins/health-check/ and provide the info that it displays under the “scheduled events” and “loopback request” sections.

    Also, try to test a scheduled posts in debug mode using the plugin with no plugins enabled. Debug mode only deactivates the plugins for the current logged in user regular visitors will still be able to see the website as normal.

    Thread Starter adrianwackernah

    (@adrianwackernah)

    Both, scheduled events and loopback request are running fine and no report about trouble shown in such cases. PHP running site is 7.3.3-nnm1.

    OK, did a test: activated debug mode in plugin, created a post with schedule few minutes later, did make clicks on site in admin and after time I got a missed schedule related to post.

    Thank you for doing that. Sounds like there is a code conflict with a plugin or your theme that is causing the problem. I am still digging for the fix I’ve used in the past to share with you. Out of curiosity are you using any caching plugins? I ask because I’ve seen cases where caching has created issues with the the wp-cron running correctly.

    Thread Starter adrianwackernah

    (@adrianwackernah)

    No, no caching. I thought about that too. Beside, many thanks for your help and time you spent for my trouble.

    Well, I have about twenty plugins installed, but all of them have good reputation. Woocommerce and many around wc. wpseo, backwpup, code snippets. Theme is Storefront from Woocommerce. They all should work fine.

    Thread Starter adrianwackernah

    (@adrianwackernah)

    Well, I could go the way I had setup before: using cron at host – from outside worpdress. Within Woocommerce there is a action scheduler for for example running tasks at given time – like wp-cron. Thats running fine because I use it Subscriptions with no trouble. But that seems not related to scheduled posts?!

    Plugins can have great reputations but still conflict with each other and/or wordpress. Out of curiosity who are you hosted with?

    Thread Starter adrianwackernah

    (@adrianwackernah)

    all-inkl.com in germany

    But I have about thirty wordpress sites there running on a managed server and no other site has this. It is related to one domain.

    If that is the case, then the problem is definitely a conflict between themes and/or plugins. Unfortunately, I can not find the article in my favorites or through google searches that guided me to a fix the last time I experience this issue. However, I did find this article which seems like an interesting way to fix the issue. https://www.wpbeginner.com/plugins/how-to-fix-the-missed-schedule-post-error-in-wordpress/

    If you do not want to follow the suggestion in that article the only permanent fix might be to do as your host suggested.

    Sorry I could not really be of more assistance. Maybe someone else will come along with ideas for you. Once you do find a fix that you are happy with kindly tag the thread as resolved.

    All the guides I’ve seen say to run wp-cron or server cron, that is to turn the other one off – but I’m not sure why. I see value on my low-traffic sites to run both, and I haven’t noticed any problems or conflicts between the two.

    Thread Starter adrianwackernah

    (@adrianwackernah)

    Thanks you all, special thanks to @binarywc

    I have solved this for me for now as I’ve created a cronjob on server which calls wp-cron every five minutes and it works. The reason below is still there. I have setup a stage site with same theme/plugins and didn’t find there any trouble.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Scheduled Posts do not get published’ is closed to new replies.