Add more intervals

Add more intervalsCodeerMeneerAdd more intervalsAdd more intervals to the options Companion Auto Update allows you to change how often certain features will run (Updaters, Notifications etc.) and by default it comes with the options for Hourly, Twice a day, Daily, Weekly and Monthly. But, we are all about giving you full control so if you want to add custom […]

Add more intervals to the options

Companion Auto Update allows you to change how often certain features will run (Updaters, Notifications etc.) and by default it comes with the options for Hourly, Twice a day, Daily, Weekly and Monthly.

But, we are all about giving you full control so if you want to add custom intervals to the plugin you can do this by adding the following code into your themes functions.php file.

function codeermeneer_add_more_intervals( $schedules ) {

$schedules['six_hours'] = array(
      'interval' => 21600, // 6 hours in seconds
      'display'  => __( 'Every 6 hours' ),
);
return $schedules;

}
add_filter( 'cron_schedules', 'codeermeneer_add_more_intervals' );