Last active
April 3, 2017 13:01
-
-
Save avillegasn/7d9b6fbc3e5379cb8b6a68de3033de96 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_hourly_task() { | |
// Do something every hour. Anything. | |
}//end my_hourly_task() | |
add_action( 'my_hourly_event', 'my_hourly_task' ); | |
if ( ! wp_next_scheduled ( 'my_hourly_event' ) ) { | |
wp_schedule_event( time(), 'hourly', 'my_hourly_event' ); | |
}//end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment