\Action_Scheduler\WP_CLI\ActionRun_Command

WP-CLI command: action-scheduler action run

Summary

Methods
Properties
Constants
__construct()
execute()
on_action_ignored()
on_action_executed()
on_action_failed()
on_action_invalid()
No public properties found
DATE_FORMAT
get_schedule_display_string()
process_csv_arguments_to_arrays()
$args
$assoc_args
$action_ids
$action_counts
N/A
No private methods found
No private properties found
N/A

Constants

DATE_FORMAT

DATE_FORMAT = 'Y-m-d H:i:s O'

Properties

$args

$args : string[]

Keyed arguments.

Type

normal

$assoc_args

$assoc_args : array<string,string>

Positional arguments.

Type

normal

$action_ids

$action_ids : int[]

Array of action IDs to execute.

Type

normal

$action_counts

$action_counts : array<string,int>

Number of executed, failed, ignored, invalid, and total actions.

Type

normal

Methods

__construct()

__construct(string[]  $args, array<string,string>  $assoc_args) : mixed

Construct.

Parameters

string[] $args

Positional arguments.

array $assoc_args

Keyed arguments.

Returns

mixed

execute()

execute() : void

Execute.

on_action_ignored()

on_action_ignored(int  $action_id) : void

Action: action_scheduler_execution_ignored

Parameters

int $action_id

Action ID.

on_action_executed()

on_action_executed(int  $action_id) : void

Action: action_scheduler_after_execute

Parameters

int $action_id

Action ID.

on_action_failed()

on_action_failed(int  $action_id, \Exception  $e) : void

Action: action_scheduler_failed_execution

Parameters

int $action_id

Action ID.

\Exception $e

Exception.

on_action_invalid()

on_action_invalid(int  $action_id, \Exception  $e) : void

Action: action_scheduler_failed_validation

Parameters

int $action_id

Action ID.

\Exception $e

Exception.

get_schedule_display_string()

get_schedule_display_string(\ActionScheduler_Schedule  $schedule) : string

Get the scheduled date in a human friendly format.

Parameters

\ActionScheduler_Schedule $schedule

Schedule.

Returns

string

process_csv_arguments_to_arrays()

process_csv_arguments_to_arrays() : void

Transforms arguments with '__' from CSV into expected arrays.