On this page
WP_Site_Health::maybe_create_scheduled_event()
Creates a weekly cron event, if one does not already exist.
Source
File: wp-admin/includes/class-wp-site-health.php. View all references
public function maybe_create_scheduled_event() {
if ( ! wp_next_scheduled( 'wp_site_health_scheduled_check' ) && ! wp_installing() ) {
wp_schedule_event( time() + DAY_IN_SECONDS, 'weekly', 'wp_site_health_scheduled_check' );
}
}
Related
Uses
| Uses | Description |
|---|---|
| wp_installing() wp-includes/load.php | Check or set whether WordPress is in “installation” mode. |
| wp_next_scheduled() wp-includes/cron.php | Retrieve the next timestamp for an event. |
| wp_schedule_event() wp-includes/cron.php | Schedules a recurring event. |
Used By
| Used By | Description |
|---|---|
| WP_Site_Health::__construct() wp-admin/includes/class-wp-site-health.php | WP_Site_Health constructor. |
Changelog
| Version | Description |
|---|---|
| 5.4.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_site_health/maybe_create_scheduled_event