Action_Scheduler\WP_CLI

Action_Command::generate()publicWC 1.0

Generates some scheduled actions.

OPTIONS

<hook>
Name of the action hook.
<start>
The Unix timestamp representing the date you want the action to start.
[--count=<count>]
Number of actions to create.
--- default: 1
---
[--interval=<interval>]
Number of seconds to wait between runs.
--- default: 0
---
[--args=<args>]
JSON object of arguments to pass to callbacks when the hook triggers.
--- default: []
---
[--group=<group>]
The group to assign this job to.
--- default: ''
---

EXAMPLES

wp action-scheduler action generate test_multiple 1627147598 --count=5 --interval=5

Method of the class: Action_Command{}

No Hooks.

Return

null. Nothing (null).

Usage

$Action_Command = new Action_Command();
$Action_Command->generate( $args, $assoc_args );
$args(array) (required)
Positional arguments.
$assoc_args(array) (required)
Keyed arguments.

Action_Command::generate() code WC 9.8.1

public function generate( array $args, array $assoc_args ) {
	require_once 'Action/Generate_Command.php';
	$command = new Action\Generate_Command( $args, $assoc_args );
	$command->execute();
}