Cron
Cron class.
Namespace: WebberZone\AutoClose\Util
Since: 3.0.0
Source: includes/util/class-cron.php line 18
Methods
register_schedules() static
Register the custom recurrence intervals used by AutoClose.
Since: 3.2.0
Line: 25
static public function register_schedules( ): void;
Returns: void
add_schedules() static
Add AutoClose’s non-core recurrence intervals.
Since: 3.2.0
Line: 41
static public function add_schedules( array $schedules ): array;
| Type | Name | Description |
|---|---|---|
array |
$schedules |
Existing schedules. |
Returns: array — Schedules with AutoClose intervals.
__construct()
Constructor.
Since: 3.0.0
Line: 66
public function __construct( );
enable_run()
Function to enable run or actions.
Since: 3.0.0
Line: 81
public function enable_run( $hour, $min, $recurrence, $future = ..., $force = ... ): bool;
| Type | Name | Description |
|---|---|---|
int |
$hour |
Hour. |
int |
$min |
Minute. |
string |
$recurrence |
Frequency. |
bool |
$future |
Ensure the first occurrence is in the future. |
bool |
$force |
Reschedule even when the existing event matches. |
Returns: bool
disable_run()
Function to disable daily run or actions.
Since: 3.0.0
Line: 129
public function disable_run( ): bool;
Returns: bool
repair()
Repair the scheduled maintenance event for the current site.
Only repairs the event when scheduled maintenance is enabled in the current site’s settings. It does not enable or disable the feature. Shared by the WP-CLI repair command and the Tools page repair action.
Since: 3.2.0
Line: 146
public function repair( bool $force = ... ): array;
| Type | Name | Description |
|---|---|---|
bool |
$force |
Reschedule the event even when it is already registered. |
Returns: array — Repair result.