Action_Scheduler\WP_CLI
Action_Command::run()
Run existing scheduled action(s).
OPTIONS
- <id>...
- One or more IDs of actions to run.
--- default: 0
---
EXAMPLES
# Run the action with id 100 $ wp action-scheduler action run 100
# Run the actions with ids 100 and 200 $ wp action-scheduler action run 100 200
# Run the first five pending actions in 'action-scheduler' group $ wp action-scheduler action run $( wp action-scheduler action list --status=pending --group=action-scheduler --format=ids )
Method of the class: Action_Command{}
No Hooks.
Return
null
. Nothing (null).
Usage
$Action_Command = new Action_Command(); $Action_Command->run( $args, $assoc_args );
- $args(array) (required)
- Positional arguments.
- $assoc_args(array) (required)
- Keyed arguments.
Action_Command::run() Action Command::run code WC 9.8.1
public function run( array $args, array $assoc_args ) { require_once 'Action/Run_Command.php'; $command = new Action\Run_Command( $args, $assoc_args ); $command->execute(); }