wp-cron.php is triggered, but scheduled post is not published

The _get_cron_array() function gets the ‘cron’ option out of the database. The cron option contains an array consisting of a series of unix-timestamps and action hooks.

So, when the timestamp is reached, then the action hook is called.

The timestamp of 1465529020 is the equivalent of June 10th, 2016, at 3:23am in UTC time.

The timestamp of 1465525264 is the equivalent of June 10th, 2016, at 2:21am in UTC time.

So, basically, that action was scheduled to run 1 hour and 2 minutes later. Which is why wp-cron didn’t run it. It wasn’t time yet.

Scheduling a post to publish at a specific time creates an entry in the cron array with the time to publish it as the key, and the action that it fires to publish it as the value. When the time is reached, the action hook gets fired, and the post gets published. That’s how wp-cron.php works.

Leave a Comment