WP_Site_Health::maybe_create_scheduled_event() WordPress Method

This method is used to create a scheduled event if one does not already exist.

WP_Site_Health::maybe_create_scheduled_event() #

Create a weekly cron event, if one does not already exist.


Source

File: wp-admin/includes/class-wp-site-health.php

	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' );
		}
	}


Top ↑

Changelog

Changelog
VersionDescription
5.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.