Title: Using wp_schedule_event
Last modified: August 19, 2016

---

# Using wp_schedule_event

 *  [mainecampus](https://wordpress.org/support/users/mainecampus/)
 * (@mainecampus)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/using-wp_schedule_event/)
 * I’m developing a plugin that uses wp schedule event, but I can’t get it to fire.
   Here’s my code:
 *     ```
       function more_reccurences() {
       return array(
       'everyminute' => array('interval' => 60, 'display' => 'Once Every Minute'),
       );
       }
       add_filter('cron_schedules', 'more_reccurences');
   
       register_activation_hook(__FILE__, 'mails_activation');
       add_action('mail_event', 'check_for_mails');
   
       function mails_activation() {
       	wp_schedule_event(time(), 'everyminute', 'mail_event');
       }
   
       function check_for_mails() {
       	global $wpdb;
   
       	$message = "Line 1\nLine 2\nLine 3";
       	$message = wordwrap($message, 70);
       	mail('caffeinated@example.com', 'My Subject', $message);
   
       }
       ```
   

The topic ‘Using wp_schedule_event’ is closed to new replies.

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [mainecampus](https://wordpress.org/support/users/mainecampus/)
 * Last activity: [16 years, 7 months ago](https://wordpress.org/support/topic/using-wp_schedule_event/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
