Recent

Cronclass

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: 69

public function run_cron(  );

enable_run() static

Function to enable run or actions.

Since: 3.0.0
Line: 136

static public function enable_run( $hour, $min, $recurrence );
Type Name Description
int $hour Hour.
int $min Minute.
string $recurrence Frequency.

disable_run() static

Function to disable daily run or actions.

Since: 3.0.0
Line: 151

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: 162

public function run_aggregation(  );

enable_aggregation_run() static

Schedule the aggregation cron to run at the configured interval.

Since: 4.3.0
Line: 171

static public function enable_aggregation_run(  );

disable_aggregation_run() static

Remove the aggregation cron.

Since: 4.3.0
Line: 192

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: 201

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: 239

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: 292

public function log_reschedule_error( $result, $hook );
Type Name Description
mixed $result Expected to be a WP_Error when core reports a failure.
string $hook Hook 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: 308

public function log_unschedule_error( $result, $hook );
Type Name Description
mixed $result Expected to be a WP_Error when core reports a failure.
string $hook Hook name the error occurred for.

get_reschedule_error() static

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

Core reports a reschedule failure when update_option( ‘cron’ ) is a no-op — e.g. a concurrent cron run already saved the identical schedule. If the hook has a valid next occurrence the recorded error is stale: clear and ignore it.

Since: 4.4.0
Line: 348

static public function get_reschedule_error( $hook ): array{code:;
Type Name Description
string $hook Hook 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: 368

static public function clear_reschedule_errors(  );