Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wp_schedule_event

//Schedules a recurring event.

register_activation_hook( __FILE__, 'my_activation' );
add_action( 'my_hourly_event', 'do_this_hourly' );
 
function my_activation() {
    wp_schedule_event( time(), 'hourly', 'my_hourly_event' );
}
 
function do_this_hourly() {
    // do something every hour
}
Source by developer.wordpress.org #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
9+9 =