• I am trying to run hourly, unfortunately no mail is being sent but if I use any other hook to directly call the function cron_update_followers I receive email. Is there a problem in my code?

    function cron_update_followers(){ mail('[email protected]','Ran','It ran');}
    add_action('stf_update_followers','cron_update_followers');
    //set up cron
    function stf_cron_activation() {
    	if ( !wp_next_scheduled( 'stf_update_followers' ) ) {
    		wp_schedule_event(time(), 'hourly', 'stf_update_followers');
                    );
    	}
    }
    //
    
    add_action('wp', 'stf_cron_activation')
  • The topic ‘wp_schedule_event() not executing’ is closed to new replies.