Skip to content

Instantly share code, notes, and snippets.

@davidsword
Created September 14, 2016 21:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidsword/ef6dda9734eeca6587dd40b906f1b9f4 to your computer and use it in GitHub Desktop.
Save davidsword/ef6dda9734eeca6587dd40b906f1b9f4 to your computer and use it in GitHub Desktop.
wordpress-simple-cronjobs-2.php
<?
add_filter('cron_schedules', 'cron_add_intervals');
function cron_add_intervals( $schedules ) {
$schedules['weekly'] = array(
'interval' => 604800,
'display' => __('Weekly')
);
$schedules['monthly'] = array(
'interval' => 2629743,
'display' => __('Monthly')
);
$schedules['quarterly'] = array(
'interval' => 10518972,
'display' => __('Quarterly')
);
$schedules['biyearly'] = array(
'interval' => 15778458,
'display' => __('BiYearly')
);
$schedules['yearly'] = array(
'interval' => 31556926,
'display' => __('Yearly')
);
return $schedules;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment