PHP Class VideoPress_Scheduler, jetpack

Since: 1.3
Datei anzeigen Open project: automattic/jetpack Class Usage Examples

Protected Properties

Property Type Description
$crons array A list of all of the crons that are to be activated, along with their interval timings.

Public Methods

Method Description
activate_all_crons ( ) Activates widget update cron task.
activate_cron ( string $cron_name ) : boolean Activate a single cron
activate_crons_on_jetpack_activation ( string $plugin_file_name ) Only activate the crons if it is Jetpack that was activated.
add_30_minute_cron_interval ( array $current_schedules ) : array Adds 30 minute running interval to the cron schedules.
check_cron ( string $cron_name ) : integer | boolean Is the given cron job currently active?
deactivate_all_crons ( ) Deactivates any crons associated with the VideoPress module.
deactivate_cron ( $cron_name ) : boolean Deactivates any crons associated with the VideoPress module.
get_crons ( ) : array Get a list of all of the crons that are available.
init ( ) : VideoPress_Scheduler Initialize the VideoPress_Scheduler and get back a singleton instance.
is_cron_valid ( string $cron_name ) : boolean Check that the given cron job name is valid.

Private Methods

Method Description
__construct ( ) Private VideoPress_Scheduler constructor.

Method Details

activate_all_crons() public method

Activates widget update cron task.
public activate_all_crons ( )

activate_cron() public method

Activate a single cron
public activate_cron ( string $cron_name ) : boolean
$cron_name string
return boolean

activate_crons_on_jetpack_activation() public method

Only activate the crons if it is Jetpack that was activated.
public activate_crons_on_jetpack_activation ( string $plugin_file_name )
$plugin_file_name string

add_30_minute_cron_interval() public method

Adds 30 minute running interval to the cron schedules.
public add_30_minute_cron_interval ( array $current_schedules ) : array
$current_schedules array Currently defined schedules list.
return array

check_cron() public method

If so, return when it will next run,
public check_cron ( string $cron_name ) : integer | boolean
$cron_name string
return integer | boolean Timestamp of the next run time OR false.

deactivate_all_crons() public method

.

deactivate_cron() public method

Deactivates any crons associated with the VideoPress module.
public deactivate_cron ( $cron_name ) : boolean
return boolean

get_crons() public method

Get a list of all of the crons that are available.
public get_crons ( ) : array
return array

init() public static method

Initialize the VideoPress_Scheduler and get back a singleton instance.
public static init ( ) : VideoPress_Scheduler
return VideoPress_Scheduler

is_cron_valid() public method

Check that the given cron job name is valid.
public is_cron_valid ( string $cron_name ) : boolean
$cron_name string
return boolean

Property Details

$crons protected_oe property

A list of all of the crons that are to be activated, along with their interval timings.
protected array $crons
return array