/cron/interval

DescriptionDescription

This filter is called before to set the cron interval.

It allows to modifies interval between each WordPress cron job of the indexer. By default the interval is set to 60s. The WordPress cron API is only used as a fallback if the internal cron system (based on asynchronous requests) failed due to server limit exceeded.

ArgumentsArguments

ArgumentTypeDescription
$interval integerCron interval in seconds

ExampleExample

PHP
functions.php
function prefix_cron_interval( $interval ) {

	// Set interval to 30s.
	return 30;

}

add_filter( 'wp_grid_builder/cron/interval', 'prefix_cron_interval', 10, 1 );