Uses
Uses | Description |
---|---|
wp-includes/load.php: is_wp_error() | Check whether variable is a WordPress Error. |
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.
(bool|WP_Error) True if a cron was missed, false if not. WP_Error if the cron is set to that.
File: wp-admin/includes/class-wp-site-health.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; }
Version | Description |
---|---|
5.2.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_site_health/has_missed_cron