Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Schedule a task that executes once in the future at the specified time
function my_task() {
// Do something. Anything.
}//end my_task()
add_action( 'my_action', 'my_task' );
// Execute my_task one hour from now...
wp_schedule_single_event( time() + 3600, 'my_action' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment