-
-
Save Tusko/48770cc0c30c48f47499d775c8763e0a to your computer and use it in GitHub Desktop.
scheduler wp
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
add_action('init', 'apiSynchronization_activation'); | |
function apiSynchronization_activation(){ | |
if ( !wp_next_scheduled( 'apiSynchronization' ) ) { | |
wp_schedule_event( time(), 'twicedaily', 'apiSynchronization'); | |
} | |
} | |
add_action('apiSynchronization', 'apiSync', 100); | |
function apiSync() | |
{ | |
//func | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment