Recent

Cron_CommandclassPro only

Cron_Command

Manage Top 10 cron jobs.

EXAMPLES

$ wp top10 cron status
$ wp top10 cron enable --job=aggregation
$ wp top10 cron disable --job=maintenance --dry-run
$ wp top10 cron run --job=aggregation

Namespace: WebberZone\Top_Ten\Pro\CLI
Since: 4.3.0
Source: includes/pro/cli/class-cron-command.php line 30 Extends: Base_Command

Methods

status()

Show the status of Top 10 cron jobs.

OPTIONS

[–format=] : Output format (table, json, csv). Default: table.

[–network] : Show status for all sites in the network.

[–blog-id=] : Specific blog ID (multisite only).

EXAMPLES

wp top10 cron status
wp top10 cron status --format=json
wp top10 cron status --network

Line: 71

public function status( array $args, array $assoc_args ): void;
Type Name Description
array $args Command arguments.
array $assoc_args Command associative arguments.

Returns: void

enable()

Enable (schedule) one or both Top 10 cron jobs.

OPTIONS

[–job=] : Which job to enable: maintenance, aggregation, all. Default: all.

[–hour=] : Hour for the maintenance cron (0-23). Default: from plugin settings.

[–min=] : Minute for the maintenance cron (0-59). Default: from plugin settings.

[–recurrence=] : Recurrence for the maintenance cron (e.g. daily, weekly). Default: from plugin settings.

[–dry-run] : Show what would be scheduled without making changes.

[–network] : Enable cron for all sites in the network.

[–blog-id=] : Specific blog ID (multisite only).

EXAMPLES

wp top10 cron enable
wp top10 cron enable --job=maintenance --hour=2 --min=0 --recurrence=daily
wp top10 cron enable --job=aggregation --dry-run
wp top10 cron enable --network

Line: 139

public function enable( array $args, array $assoc_args ): void;
Type Name Description
array $args Command arguments.
array $assoc_args Command associative arguments.

Returns: void

disable()

Disable (unschedule) one or both Top 10 cron jobs.

OPTIONS

[–job=] : Which job to disable: maintenance, aggregation, all. Default: all.

[–force] : Skip interactive confirmation.

[–dry-run] : Show what would be unscheduled without making changes.

[–network] : Disable cron for all sites in the network.

[–blog-id=] : Specific blog ID (multisite only).

EXAMPLES

wp top10 cron disable
wp top10 cron disable --job=maintenance --force
wp top10 cron disable --dry-run
wp top10 cron disable --network --force

Line: 223

public function disable( array $args, array $assoc_args ): void;
Type Name Description
array $args Command arguments.
array $assoc_args Command associative arguments.

Returns: void

run()

Run a Top 10 cron job immediately.

OPTIONS

[–job=] : Which job to run: maintenance, aggregation, all. Default: all.

[–dry-run] : Show what would run without executing.

[–network] : Run cron for all sites in the network.

[–blog-id=] : Specific blog ID (multisite only).

EXAMPLES

wp top10 cron run
wp top10 cron run --job=maintenance
wp top10 cron run --job=aggregation --dry-run
wp top10 cron run --network

Line: 302

public function run( array $args, array $assoc_args ): void;
Type Name Description
array $args Command arguments.
array $assoc_args Command associative arguments.

Returns: void