/cron/max_execution_time
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.
Argument | Type | Description |
$execution_time | integer | Execution time in seconds |
[pastacode lang=”php” manual=”function%20prefix_cron_max_execution_time(%20%24execution_time%20)%20%7B%20%0A%0A%09%2F%2F%20Set%20execution%20time%20to%2060s.%20%0A%09return%2060%3B%0A%7D%0A%0Aadd_filter(%20’wp_grid_builder%2Fcron%2Fmax_execution_time’%2C%20’prefix_cron_max_execution_time’%2C%2010%2C%201%20)%3B” message=”” highlight=”” provider=”manual”/]