WordPress at Your Fingertips
function is not described

WP_Site_Health::maybe_create_scheduled_event() public WP 5.4.0

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

{} It's a method of the class: WP_Site_Health{}

No Hooks.

Return

null. Nothing.

Usage

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

Changelog

Since 5.4.0 Introduced.

Code of WP_Site_Health::maybe_create_scheduled_event() WP 5.8.2

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