添加以下代码尝试在发布文章时重新指定触发时间戳:
add_action( 'save_post', function ( int $post_ID, WP_Post $post ) {
if ( 'future' !== $post->post_status ) {
return;
}
wp_clear_scheduled_hook( 'publish_future_post', array( $post_ID ) );
wp_schedule_single_event( strtotime( $post->post_date )/* + 28800 */, 'publish_future_post', array( $post_ID ) );
}, 9999, 2 );
如果依然早8小时发布的话,就把上面代码中的注释去掉,这样就会在文章发布时将任务向后偏移8小时。