Tribe__Process__Queue::schedule_cron_healthcheck( mixed $schedules )
Schedules a cron-based health-check to restart the queue if stuck.
Contents
Filters the cron_schedules filter to add a check every 5 minutes.
Parameters
- $schedules
-
(mixed) (Required) The cron schedules to check.
Return
(mixed) The updated cron schedules.
Source
File: src/Tribe/Process/Queue.php
public function schedule_cron_healthcheck( $schedules ) {
/**
* Filters the number of minutes to schedule the cron health-check.
*
* @since 4.9.5
*
* @param int $interval The number of minutes to schedule the cron health-check; defaults to 5.
* @param static $this This process instance.
*/
$interval = apply_filters( $this->identifier . '_cron_interval', $this->healthcheck_cron_interval, $this );
// Adds every 5 minutes to the existing schedules.
$schedules[ $this->identifier . '_cron_interval' ] = [
'interval' => MINUTE_IN_SECONDS * $interval,
'display' => sprintf( __( 'Every %d Minutes', 'tribe-common' ), $interval ),
];
return $schedules;
}
Changelog
| Version | Description |
|---|---|
| 4.9.5 | Introduced. |