• 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 - 16 through 30 (of 78 total)
  • Apparently there is a light bulb missing a switch. At least we found the root of the problem, though a fix would have been super groovy.

    Verify that the the time is setup wrong on the SQL server by running the following query in phpMyAdmin:

    SELECT curtime( ), curdate( )

    If it’s ahead by 4 hours, adjust your time in WP by -4.

    Mine says:
    curtime() curdate()
    13:18:08 2007-05-29

    I’m in Germany, so it’s just a tad off – by about 6 hours… I keep mine on East Coast time to keep me in check with “home”.

    Time is setup correctly on the server, I have the four hour difference in WP. Somehow I need to get the SQL to change the post status from Future to Publish once the time has passed. The cron does it’s thing (which was mentioned here earlier), just the post status isn’t flipping over.

    And that’s where we all got stumped.

    Sorry – it’s already been a long programming day so I’m pretty fried already. (I really can’t stand .Net)

    Do you have 2 servers running separately for Web and DB usage? This sounds almost as if one server is kicking properly and alerting the other, but due to time issues between the two, nothing is happening.

    LOL! I pay for only one web hosting package. The site is all together there: web, sql, cpanal, email… blah, blah, blah…

    cron that I looked up earlier is in the same ‘big picture’ sql database for WP as the post status information, just in different tables (if I am understanding sql correctly).

    The WP latest upgrade did database upgrades with 2.2, but since everyone should have had to upgrade their databases as well (I’m not the only one, am I?), then wouldn’t everyone be having this future/publish switch issue?

    I wish I had the time to do a totally fresh install, but being at work, I’m already breaking rules being here….

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Okay, I’m slightly confused… If you’re 4 hours off GMT, then those times were correct. WordPress stores two times with every post, one in GMT, one in your local time. That’s normal, it’s not an error.

    What do you think is an error above?

    Um, there isn’t an error from what I see in the times. Times on the server are good.

    Only error is not getting the post status to change.

    Isn’t that where we are at? I thought that’s where we were at… maybe it’s me…

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Okay, I just got confused by some kind of implication that it was a database time thing. It’s not, the “future” doesn’t change automatically. WordPress changes it when the cron job runs. Or, at least, it is supposed to do so.

    I took a few (lots) of minutes and installed a second, fresh, copy of WP and a second SQL database on the server using a sub-domain. The future posting works, so I’m thinking the settings on the actual server are not a problem.

    While I would like to do an export/import of my blog to the fresh, working, version, my export file is over 5mb, and apparently there is a 2mb limit.

    I was thinking about exporting the SQL databases, but where as they are most likely the problem, I don’t want to just import an existing problem (that kind of defeats the purpose).

    Does anyone know how to work around the 2mb import file limit so as to import the blog data, without using the actual SQL databases?

    I had this problem only after my restore my base after a bad upgrade to 2.2. I am back to 2.1.3 and the only thing that doesn’t work is this and feed for embed videos. I don’t know what to do. And you haven’t answered the question how to make it work again.

    I’m having the trouble with the wrong timezone as well as the scheduled posts not posting automatically despite selecting the box where I have changed the date and time for posting, and pressing publish.

    When I check my site and see the entry hasn’t posted on the day it was supposed to, I access the entry and press publish again and only then does it post.

    I’m running version 2.1 and the only plugins I’m using are Spam Karma 2 and WordPress Database Backup

    Problem not solved even if i do a fresh install…

    I tried to execute directly wp-cron.php and it didn’t work.
    Then i edited teh file and commented out the following lines

    #if ( $_GET[‘check’] != wp_hash(‘187425’) )
    # exit;

    Now when i start wp-cron.php it WORKS! It’ able to post automatically when the timestamp is reached.
    The only problem that remains is that it seems that wp-cron.php is not started automatically. In fact, if i start it, the blog is update with new posts, but it is not so if the script is not executed manually.

    Does anybody know which file calls wp-cron.php?

    SOLVED:
    With a brute hack, finally i got this feature working again. Sorry for the last 3 posts, but i’m making a lot of test and i reported each single progress.
    To solve it:

    chmod -R 775 * to set executable flag to each wp script.

    Then edit wp-cron.php and comment the following lines:

    #if ( $_GET[‘check’] != wp_hash(‘187425’) )
    # exit;

    #if ( get_option(‘doing_cron’) > time() )
    # exit;

    Then edit index.php and force the execution of wp-cron.php each time that the index.php webpage is loaded (yes i know that it will increase database calls… this is why it’s a brute hack). To do so change your index.php with this one:

    <?php
    /* Short and sweet */
    define(‘WP_USE_THEMES’, true);
    require(‘./wp-cron.php’);
    require(‘./wp-blog-header.php’);
    ?>

    Now everyting should work, when the timestamp is reached && an user views your blog, it’s automatically updated with new posts.

    Ps: probably there should be a better solution, but for now it works…

    Hello,

    I had the same problem, and your workaround works for me too.

    wp-cron.php is called by wp-includes/cron.php (function spawn_cron).

    The problem, in my case, il that the php function “fsockopen” is not allowed by my hosting provider, when the URL is “local”.

    For my complete tests, you can read http://blog.quelbazar.net/2007/06/16/wordpress-22-et-les-problemes-rencontres-sur-quelbazar/ , (in french…)

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