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 - 31 through 45 (of 78 total)
  • The problem isn’t with the WP software itself, and it’s been shown that it’s not in the server. It’s a MySQL problem. Granted, brute force will put a band-aid on it, but it won’t fix it. The really weird thing is I get my WP via SVN. I’m currently running 2.3-Alpha … and I still can’t future post.

    I think it’s not a problem with configuration of apache/mysql because if i call wp-cron.php directly it WORKS!

    So the problem is that nobody calls wp-cron.php and probably it’s a WordPress bug. I’ll investigate on this.

    the problem seems to be at the fsockopen step, i checked my php.ini file and i saw that it allows fsockopen functions.

    If it was a configuration problem either calling directly wp-cron.php should not work….

    I saw elsewere that there is same symptoms with different cause for this problem.

    wp-cron.php *is called* by wp-includes/cron.php (function spawn_cron), at each visit or admin panel load.

    For my case :
    There is no WP bug : I checked the call made by cron.php to wp-cron.php : The arguments are OK.
    There is no MySql problem, because the manual call of wp-cron.php (affter disabling first check in the script) is OK.
    in my case, fsockopen works fine when calling an external URL. But it does not work with an internal URL : It’s a “feature” of my hosting solution…..

    It was a DNS problem.
    wp-cron.php upgrades posts by calling with a socket the host in get_option(‘siteurl’). This hostname is your blog. If you dns does not answer right to you internal server the connection will fail and wp-cron.php will be not called.
    To solve this in my “home” server i set up bind9 and set it to answer to the internal requests of my domain with Now it work like a charm.

    A few days ago I moved to a new host, used a fresh wp-install, uploaded my blog database and now the timestamp is not working for me. Future posts are not being published.

    The problem is just like mentioned above: you can see the future post in the dashboard ready to be published in 20 minutes (example). When that time comes, it doesn’t get posted and the dashboard now displays the amount of time since the scheduled time (say the post was to be published 10 minutes ago, the dashboard time display shows “10 minutes”).

    I tried hitting the wp-cron.php directly and I get a blank white page–post is not published.

    It’s a busy blog and I can’t do that database brute force thing, my host will kill me I’m sure ;).

    What can I do to fix this and get the timestamp feature going again?

    I also upgraded to 2.2.1 tonight–timestamp still no-worky for me.

    To solve this in my “home” server i set up bind9 and set it to answer to the internal requests of my domain with Now it work like a charm.

    What do we do for blogs hosted elsewhere?

    Edit: sorry, fixed the cron file mention (ack–twice lol)

    Is that what we need to do on our production servers? I sent a support ticket to my host asking them what to do and they didn’t really know. How do I do it?

    Edit: 2.3 Alpha “no-worky” either. And neither does deleting the database and importing a WP XML file. That just adds work load.

    jonlandrum did it work for you before on the same host?

    I was wondering since it worked perfectly fine on my old host (version 2.2) and didn’t have a problem until I moved to the new host (same version 2.2–but fresh install), if it’s something to do with the server I’m on?

    Edit: typo


    I installed a test blog using 2.2.1 in a separate directory on the same host, timestamp doesn’t work.

    I installed another test blog in another test directory on the same host using version 2.0.3 and the timestamp DOES work.

    Any ideas what changed and what I can do to fix it (or get my host to tweak)?

    Edit Update:

    Just tested 2.1.3 and it does not work, so it’s something between 2.0 and 2.1 that changed and it’s affecting some of us for some reason.

    Terry, yes, I’ve been with this host since the late 1.5 days. It was the switch from 2.0 to 2.1 that changed it (namely, the inclusion of wp-cron.php.)

    Quick question: Is there somewhere that I should report this bug so it will be addressed? Or is this it?

    Also if anyone has found a workaround or even a piece of software to buy that will post future posts, please let me know–I’d very much appreciate it. I’m up the creek without timestamp and I can’t move to another host for a variety of reasons.

    This is where you’d post it. Also, it’s all over Trac. I’ve seen at least three threads there, plus nearly a dozen here.

    My host got back to me this evening. They thought they had a lead with mod_php, but WP doesn’t use that. I’ll post here the workaround they find, if it’s extendable.

    Thanks for that jonlandrum, if I find a workaround I’ll post it in here too. I’m not very techy so any method I come up with will probably be clunky–but if it gets the job done I’ll post it. Not having much luck so far though.

    Aha! “teh admins” have come up with a solution:

    I can see a quick (and dirty maybe) workaround for now. Just edit wp-cron.php, comment out these two lines:

    6 if ( $_GET['check'] != wp_hash('123456') )
    7 exit;

    and set up an hourly Cron job executing wp-cron.php using a CLI php binary like this:

    /usr/local/bin/php /users/home/USERNAME/web/public/wp-cron.php

    That should basically give you the same functionality.


    Filip Hajny
    Customer Support Manager
    Joyent Inc.

    jonlandrum you have saved me. I’m not kidding — I was waking up every three hours just to push the “publish” button ;).

    I had to adjust the hack a bit. This host I’m on doesn’t have cPanel so I have to work with Putty and SSH — and I don’t know what the heck I’m doing, lol. I tried every which way and the crontabs seemed to stick and looked really good (when I did crontab -l), but the posts wouldn’t publish. So this is what I ended up doing:

    Using another hosting account I have (with cpanel) and setup this command in the crontab:

    /usr/bin/wget -O – -q http: //

    And it works! ::sob::

    Thanks so much for sharing the ‘fix’, this will enable me to get a full night’s sleep again :).

    **Edit: To use this, remove the space between the http:// above, I had to add it so the link wouldn’t be live.


    One potential side-benefit I saw is that my server was hitting wp-cron.php every minute and a half. Currently I’ve got Cron hitting it once a day. But I may switch that to weekends-only, since that’s when I publish. So some resources are saved besides its working better. Anything to be a better neighbor! :o)

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