Last active
June 18, 2018 08:57
-
-
Save anthonybudd/0d10ad27cb72926f6c9b4c2608cd704d to your computer and use it in GitHub Desktop.
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
<?php | |
Class ExampleCronEvent extends WP_Cron{ | |
public $every = [ | |
'seconds' => 30, | |
'minutes' => 15, | |
'hours' => 1, | |
]; | |
public function handle(){ | |
update_option('last_ran', current_time('mysql')); | |
} | |
} | |
ExampleCronEvent::register(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment