WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_Site_Health::has_missed_cron() public WP 5.2.0

Check if any scheduled tasks have been missed.

Returns a boolean value of true if a scheduled task has been missed and ends processing.

If the list of crons is an instance of WP_Error, returns the instance instead of a boolean value.

Это метод класса: WP_Site_Health{}

Хуков нет.

Возвращает

true/false/WP_Error. True if a cron was missed, false if not. WP_Error if the cron is set to that.

Использование

$WP_Site_Health = new WP_Site_Health();
$WP_Site_Health->has_missed_cron();

Список изменений

С версии 5.2.0 Введена.

Код WP_Site_Health::has_missed_cron() WP 5.5.1

wp-admin/includes/class-wp-site-health.php
<?php
public function has_missed_cron() {
	if ( is_wp_error( $this->crons ) ) {
		return $this->crons;
	}

	foreach ( $this->crons as $id => $cron ) {
		if ( ( $cron->time - time() ) < $this->timeout_missed_cron ) {
			$this->last_missed_cron = $cron->hook;
			return true;
		}
	}

	return false;
}