Title: wp_schedule_event
Last modified: August 21, 2016

---

# wp_schedule_event

 *  [jockhip12](https://wordpress.org/support/users/jockhip12/)
 * (@jockhip12)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/wp_schedule_event-1/)
 * Hi,
 * I want to know if wp_schedule_event (hourly execution cron) should be mandatory
   in functions.php or even can be in any plugin.

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/wp_schedule_event-1/#post-3907678)
 * It can be in a plugin. In fact, F J Kaiser added a comment to the Codex page 
   a couple weeks ago (with no explanation) implying using it in a theme could be
   problematic.
 * This probably because a recurring event should be scheduled only once, such as
   during plugin activation. Doing so from functions.php will result in a redundant
   scheduled event being added for every WP page requested!
 * Note that you could put the scheduler inside a conditional that checks for the
   existence of a schedule already with `wp_next_scheduled()`. In such a case, scheduling
   from functions.php should work OK.

Viewing 1 replies (of 1 total)

The topic ‘wp_schedule_event’ is closed to new replies.

## Tags

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

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/wp_schedule_event-1/#post-3907678)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
