• I’m testing wp_schedule_single_event function with this code
    and it looks like it never trigger function do_this_in_an_hour()

    Can anybody help please.

    function do_this_in_an_hour() {
    
    	mail("[email protected]",
    	"test",
    	"test",
    	"From: [email protected]"
    	);
    
    }
    add_action('my_new_event','do_this_in_an_hour');
    
    //wp_clear_scheduled_hook('my_new_event');
    wp_schedule_single_event(time()+10, 'my_new_event');
    
    //counter
    $cnt=wp_next_scheduled('my_new_event') - time();
    echo $cnt;
  • The topic ‘wp_schedule_single_event Doesn’t Work’ is closed to new replies.