Crons::register()

Registers the filters required by the provider to manage cron processes.


Source #

File: src/Tribe/Service_Providers/Crons.php

	public function register() {
		// Schedule a cron event happening once a day.
		if ( ! wp_get_schedule( 'tribe_daily_cron' ) ) {
			wp_schedule_event( time(), 'daily', 'tribe_daily_cron' );
		}

		// Register actions that should happen on that hook.
		add_action( 'tribe_daily_cron', [ DB_Lock::class, 'prune_stale_db_locks' ] );
	}

Top ↑

Changelog #

Changelog
Version Description
TBD Introduced.