WP_Site_Health::maybe_create_scheduled_event()

In this article

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

Source

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

Changelog

VersionDescription
5.4.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.