Support » Fixing WordPress » Schedule a post to be published at a future date: Does not work

  • Hello,

    Sometimes i need to write an article or post and schedule it to be published at a future date.

    I know that this feature works in WP by editing a post’s Timestamp and put a future date/time there.

    Unfortunately, this doesn’t work for me. When the right time comes, nothing is published.

    In Dashboard i can see all Scheduled Entries. When current time passes the timestamp, all Scheduled Entries are not published, but still appear in dashboard, showing how much time has passed from the poststamp time to now (weird)

    Any ideas to help?

Viewing 15 replies - 1 through 15 (of 78 total)
  • What is the Post Status?

    The post status is “Published”

    Try accessing http://example.com/blog/wp-cron.php . See if that forces them to publish. If so, then the problem is likely that the cron process cannot automatically run. Several things could cause this..incorrect DNS settings on the server, incorrect info in the url’s on the options->general page, etc.

    Also remember that it won’t actually post until somebody accesses your blog itself (not the admin pages, the live blog). If nobody looks at the blog, nothing will happen.

    Otto42: I can hit that page in my WP install and get a nice blank page, no apparent errors. I have other cron processes running on my blog (postie for moblogging) without a hitch.

    This future posting problem worked prior to one of the last few WP updates. I’ve been with WP since version 1.x, and future posting my little heart out without a hitch until I’d guess 2.1 something-or-other came out.

    I’m going to guess (right or wrong) that there was a change deep down in the WP code that killed this feature.

    It’s almost as if WP can’t move ‘published’ (since the entry is in the database, it is considered published) entries from “future” and hidden from view, to “live” for the world to see.

    If it was just a matter of hitting wp-cron.php, heck, I could live with that, but, sorry, it’s more then that.

    wp-cron.php doesn’t force them to publish

    DNS is checked OK
    info in general page is checked OK

    the feature of Scheduled publishing does not work.

    i made experiments with the timezone offset too (put no offset, put +2, put -2) but nothing happened either.

    @choco-cookie:

    Otto42: I can hit that page in my WP install and get a nice blank page, no apparent errors. I have other cron processes running on my blog (postie for moblogging) without a hitch.

    Postie uses a different type of cron, not the same thing at all. Unless you’re using “cronless postie”.

    I’ve been with WP since version 1.x, and future posting my little heart out without a hitch until I’d guess 2.1 something-or-other came out.

    2.1 added the new wp-cron.php functionality. What you suggest supports my argument, that your wp-cron is not working correctly.

    It’s almost as if WP can’t move ‘published’ (since the entry is in the database, it is considered published) entries from “future” and hidden from view, to “live” for the world to see.

    a) That’s *not* what “published” means. Drafts are in the database too.
    b) When the post_status field changes from “future” to “publish”, *then* is is published. Not before. And wp-cron is what makes that happen, as of 2.1 and up. wp-cron does several other things too (pingbacks, trackbacks, etc).

    If it was just a matter of hitting wp-cron.php, heck, I could live with that, but, sorry, it’s more then that.

    No, you’re *not* supposed to hit wp-cron yourself. WordPress does that all by itself. However, if it cannot for various reasons, then you would see the same sort of symptoms you are both describing.

    Running any weird plugins? Anything not explicitly listed as 2.1 compatible?

    @animator:

    the feature of Scheduled publishing does not work.

    If you’re going to make silly blanket statements like this, then you can just solve your problem yourself. The fact is that future publishing *does* work, I do it all the time. It’s not working *for you*, so please confine yourself to sane and rational discourse on this forum. Okay?

    (I’m using an actual cron job to use postie, but that’s not the point here…)

    If wp-cron.php changed in version 2.1, and I don’t need trackback, pingbacks, or anything other then posting, is just reverting to a prior version of this one file a potential fix? Or has the way WP uses wp-cron.php fundamentally changed to the point only a new version works (or doesn’t work, whatever the case may be)?

    And if I’m not getting any errors when hitting wp-cron.php, how does one trouble shoot that it’s not working correctly? There isn’t any feedback to go off of, like “yeah, you did it!” or “boo! error 5 million & 72, failure”? I checked my host server error logs and hit had nothing to go on either. Bummer.

    If wp-cron.php changed in version 2.1, and I don’t need trackback, pingbacks, or anything other then posting, is just reverting to a prior version of this one file a potential fix? Or has the way WP uses wp-cron.php fundamentally changed to the point only a new version works (or doesn’t work, whatever the case may be)?

    Fundamental deep change, so no, you can’t revert just part of it.

    And if I’m not getting any errors when hitting wp-cron.php, how does one trouble shoot that it’s not working correctly? There isn’t any feedback to go off of, like “yeah, you did it!” or “boo! error 5 million & 72, failure”? I checked my host server error logs and hit had nothing to go on either. Bummer.

    wp-cron.php never returns anything. That’s not what it’s supposed to do. It’s more of a background process, it has no output.
    You can get some information based on the time it takes to run.. If it returned quickly, then it didn’t find any work that it had to perform, so it stopped processing right away. If it took a while, then maybe it had stuff to do.

    If you have phpMyAdmin, you can see some of the various tasks it has scheduled in the options table (under the “cron” key). I would not modify this data, but you can at least learn something from the names of the things in the data.

    Of course, if it has no data there, then it’s not expecting to have to do anything in the foreseeable future.

    @ Otto42:

    My friend thank you for your help so far.

    You misunderstood my statement, it was only for my situation and not general. I love WP and most of all i love all people that trying to help, like you. I also try to help others sometimes too.

    But statements like yours :”If you’re going to make silly blanket statements like this, then you can just solve your problem yourself.” are very aggressive and do not fit to my behaviour or personality!

    OK, since we’re here… yeap, I have phpmyadmin (my host loves me I guess)

    Option ID 164,
    option value a:2:{i:1180476345;a:1:{s:19:”publish_future_post”;a:1:{s:32:”7e4251348df5ebeea43a212b0d548ef8″;a:2:{s:8:”schedule”;b:0;s:4:”args”;a:1:{i:0;i:2734;}}}}s:7:”version”;i:2;}

    Funny enough, the “doing cron” has an option value of 0.

    Funny enough, the “doing cron” has an option value of 0.

    That’s normal. That means it’s not doing cron at this exact moment. 🙂

    Option ID 164,
    option value a:2:{i:1180476345;a:1:{s:19:”publish_future_post”;a:1:{s:32:”7e4251348df5ebeea43a212b0d548ef8″;a:2:{s:8:”schedule”;b:0;s:4:”args”;a:1:{i:0;i:2734;}}}}s:7:”version”;i:2;}

    Well, it looks like you do have a future post scheduled, but it’s not time for it to be published yet. That timestamp translates to Tuesday, May 29th 2007, 22:05:45 (GMT), which is in about 6 hours or so.

    Otto42, why yes I do have a test post scheduled for that time! I’m glad someone can read that 🙂

    I also have one scheduled to post at a date/time of May 28, 2007 @ 22:34, which unfortunately was last night.

    Dashboard seems to be holding the scheduled entries hostage!! (really need to whip it into shape, moosh! moosh!)

    Personally, I’m getting a bit stumped by this. If it was just me then I would say I goofed up big time (ok, I probably did, but where oh where…), but here we have Animator struggling along with the same issue. Too bad we couldn’t figure out the commonality between us, and then find a nice work-around…

    I also have one scheduled to post at a date/time of May 28, 2007 @ 22:34, which unfortunately was last night.

    Using phpMyAdmin, go find that entry in the posts table, and see what the post_status is.

    If it’s still future, then I cannot explain why it didn’t get changed to publish. You can go ahead and change it to “publish” and it will then show up on the blog.

    Sherlock, we have a clue!

    Post date: 2007-05-28 22:34:03
    Post Date GMT: 2007-05-29 02:34:03
    Post Status: future

    Ooo!!! My sql tables doesn’t know how to tell time!! 🙂

    Hmmm… From that, I assume you’re in the Eastern Time zone.

    I dunno, I cannot think of why it would not have worked. The schedule you posted doesn’t show a run for that time, so it must have ran and finished without changing the post_status from “future” to “publish”. But as for why, I cannot say why it would do that.

Viewing 15 replies - 1 through 15 (of 78 total)
  • The topic ‘Schedule a post to be published at a future date: Does not work’ is closed to new replies.