Created
July 25, 2012 09:11
-
-
Save corsonr/3175215 to your computer and use it in GitHub Desktop.
Create a custom cron interval
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 CRON CUSTOM INTERVALS | |
----------------------------------------- */ | |
add_filter('cron_schedules', 'xxx_cron_every_two_days'); | |
// add a cron interval every 2 days | |
function xxx_cron_every_two_days( $schedules ) { | |
$schedules['every_two_days'] = array( | |
'interval' => 172800, // in seconds | |
'display' => __('Every two days', 'xxx') | |
); | |
return $schedules; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment