The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Timestamp a post - What Happens? (2 posts)

  1. pickledegg
    Posted 8 years ago #

    I've written a script that inserts a load of posts from an articles database into a wordpress database. The posts are given a timestamp that is staggered at a rate of approx 4 posts a day.

    The posts go in, but don't publish when the timestamp arrives, they just sit there in limbo.
    I know why they don't publish - THE CRON.

    I'm going up the wall trying to figure out what I have to code to tell the cron to deal with the post.

    Heres the script, I need to 'add each post to the cron'.

    I've been struggling on this for weeks, does anyone know how to add each post to the cron queue?



  2. pickledegg
    Posted 8 years ago #

    I used this in the end


    But may I add that the documentation is WRONG, as it tells you to pass this:

    $post_category = array( 'post_category' => $parent_id );

    but in fact you must pass something like this:

    $post_category[0] = $parent_id;

    Do not name the key, it doesn't ******* work!

Topic Closed

This topic has been closed to new replies.

About this Topic