What am I doing wrong creating post draft via wp-cron? (wp_schedule_event & wp_insert_post)

The problem is that you’re only hooking the cron action on admin_init, which doesn’t run when wp-cron.php is called. So the function will never run. So this function shouldn’t be inside wpcp_activate(): add_action( ‘wpcp_cron_hook’, ‘wpcp_cron_do’ ); Also, register_activation_hook() shouldn’t be inside the admin_init hook either. So your code should look like this: function wpcp_make_post( $post_title, … Read more