Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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
You can’t perform that action at this time.