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