Created
December 7, 2016 13:55
-
-
Save moskalukigor/6adaeba72ecd97c6a6c5180c4fcd0366 to your computer and use it in GitHub Desktop.
scheduler wp
This file contains hidden or 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