BP_Background_Process::schedule_cron_healthcheck( array $schedules )

Schedule cron healthcheck.

Description

Parameters

$schedules

(Required) Schedules.

Return

(array)

Source

File: bp-core/classes/class-bp-background-process.php

		public function schedule_cron_healthcheck( $schedules ) {
			$interval = apply_filters( $this->identifier . '_cron_interval', 5 );

			if ( property_exists( $this, 'cron_interval' ) ) {
				$interval = apply_filters( $this->identifier . '_cron_interval', $this->cron_interval );
			}

			// Adds every 5 minutes to the existing schedules.
			$schedules[ $this->identifier . '_cron_interval' ] = array(
				'interval' => MINUTE_IN_SECONDS * $interval,
				/* translators: %d: interval */
				'display'  => sprintf( __( 'Every %d minutes', 'buddyboss' ), $interval ),
			);

			return $schedules;
		}

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.