/cron/max_execution_time

DescriptionDescription

This filter is called everytime the indexer start a cron process.

It allows to modifies the max_execution_time (in seconds) of the cron indexer.

The cron system of the plugin will frequently check, when indexing, if the server max_execution_time is not reached at a certain rate (80%). It prevents to break the indexer if this limit is reached. However, because between 2 checks, operations may exceed this limit you may need to decrease the max_execution_time thanks to this filter.

ArgumentsArguments

ArgumentTypeDescription
$execution_timeintegerExecution time in seconds

ExampleExample

PHP
functions.php
function prefix_cron_max_execution_time( $execution_time ) {

	// Set execution time to 60s.
	return 60;

}
add_filter( 'wp_grid_builder/cron/max_execution_time', 'prefix_cron_max_execution_time', 10, 1 );