Adding a custom cron interval
-
Hi,
I have tried using the code here – https://docs.wprssaggregator.com/add-a-custom-cron-interval/ and amended it as follows to create a 3 hour interval:
add_filter( ‘cron_schedules’, ‘cron_add_3h’ );
function cron_add_3h( $schedules ) {
$schedules[‘3 hours’] = array(
‘interval’ => 10800, // 60sec*60min*3hours
‘display’ => __( ‘3 hours’ )
);
return $schedules;
}However, it’s not appearing as an option in my settings.
Have I done something wrong?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Adding a custom cron interval’ is closed to new replies.