Recent

Cron class

Cron

Class Cron

Namespace: WebberZone\Top_Ten\Admin
Source: includes/admin/class-cron.php line 20

Methods

__construct()

Initialize the class.

Line: 52

public function __construct(  );

run_cron()

Function to truncate daily run.

Since: 3.0.0
Line: 66

public function run_cron(  );

enable_run() static

Function to enable run or actions.

Since: 3.0.0
Line: 126

static public function enable_run( $hour, $min, $recurrence );
TypeNameDescription
int$hourHour.
int$minMinute.
string$recurrenceFrequency.

disable_run() static

Function to disable daily run or actions.

Since: 3.0.0
Line: 141

static public function disable_run(  );

run_aggregation()

Drain the visits log into the count tables and prune orphaned log rows.

Since: 4.3.0
Line: 152

public function run_aggregation(  );

enable_aggregation_run() static

Schedule the aggregation cron to run at the configured interval.

Since: 4.3.0
Line: 161

static public function enable_aggregation_run(  );

disable_aggregation_run() static

Remove the aggregation cron.

Since: 4.3.0
Line: 182

static public function disable_aggregation_run(  );

check_aggregation_cron()

Check that the aggregation cron is scheduled at the correct interval; reschedule if missing or changed.

Since: 4.3.0
Line: 191

public function check_aggregation_cron(  );

aggregation_cron_missing_notice()

Show an admin notice when the aggregation cron was missing or rescheduled due to an interval change.

Since: 4.3.0
Line: 221

public function aggregation_cron_missing_notice(  );

log_reschedule_error()

Record a core WP-Cron reschedule failure for one of our hooks.

Fired from wp-cron.php when the real cron runner fails to persist the next occurrence of a recurring event (_set_cron_array() failure).

Since: 4.4.0
Line: 274

public function log_reschedule_error( $result, $hook );
TypeNameDescription
mixed$resultExpected to be a WP_Error when core reports a failure.
string$hookHook name the error occurred for.

log_unschedule_error()

Record a core WP-Cron unschedule failure for one of our hooks.

Since: 4.4.0
Line: 290

public function log_unschedule_error( $result, $hook );
TypeNameDescription
mixed$resultExpected to be a WP_Error when core reports a failure.
string$hookHook name the error occurred for.

get_reschedule_error() static

Retrieve the last recorded cron scheduling error for a hook, if any.

Since: 4.4.0
Line: 326

static public function get_reschedule_error( $hook ): array{code:;
TypeNameDescription
string$hookHook name.

Returns: array{code: — string, message: string, time: int}|false Error data, or false if none recorded.

clear_reschedule_errors() static

Clear the recorded cron scheduling errors for all tracked hooks.

Since: 4.4.0
Line: 337

static public function clear_reschedule_errors(  );