Based on an example found on this page, I attempted to use this in my plugin. Nothing fired. A note on this page stated publish_future_post is deprecated and replaced with future_to_publish. This also failed.
Therefore, I tried to make a simple plugin with only this add_action into the plugin. Once again, the postmeta was not updated.
Here is the code in the "future post" plugin.
function future_publish ( $post_id ) {
update_post_meta( $post_id, 'hook_fired', 'true' );
}
add_action( 'future_to_publish', 'future_publish' );
I've been going round and round. Some people are posting the transition status works fine, others say it cannot be wrapped in is_admin, and still, I cannot get a scheduled post to actually fire anything except for the post to WP. I cannot hook into it.
Has anyone actually tried to hook in and had something happen after the scheduled post becomes published?
Update: Please excuse my typing. I meant published and originally typed post. It's due to my frustration with this topic.
Update Number 2: I copied the code from an answer which is specific to $old == 'future' and this worked to update the meta. Great. But the code after the meta (not shown here) doesn't run. At least now I know that the action is working when $old == 'future'. I'm not sure why the rest of the code after doesn't work but that would be a different question.
For now, I can only assume that the code $old != 'publish' does not fire scheduled posts and the 'future' must be specified. I'll mark the answer.