Title: wp_schedule_event() not executing
Last modified: August 20, 2016

---

# wp_schedule_event() not executing

 *  [classicon](https://wordpress.org/support/users/classicon/)
 * (@classicon)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/cron-not-executing/)
 * 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('x@gmail.com','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.

## Tags

 * [cron](https://wordpress.org/support/topic-tag/cron/)
 * [widget](https://wordpress.org/support/topic-tag/widget/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [classicon](https://wordpress.org/support/users/classicon/)
 * Last activity: [14 years, 10 months ago](https://wordpress.org/support/topic/cron-not-executing/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
