ActionScheduler_ActionFactory::cron()publicWC 1.0

Create the first instance of an action recurring on a Cron schedule.

Метод класса: ActionScheduler_ActionFactory{}

Хуков нет.

Возвращает

int. The ID of the stored action.

Использование

$ActionScheduler_ActionFactory = new ActionScheduler_ActionFactory();
$ActionScheduler_ActionFactory->cron( $hook, $args, $base_timestamp, $schedule, $group );
$hook(строка) (обязательный)
The hook to trigger when this action runs.
$args(массив)
Args to pass when the hook is triggered.
По умолчанию: array()
$base_timestamp(int)
The first instance of the action will be scheduled to run at a time calculated after this timestamp matching the cron expression. This can be used to delay the first instance of the action.
По умолчанию: null
$schedule(int)
A cron definition string.
По умолчанию: null
$group(строка)
A group to put the action in.
По умолчанию: ''

Код ActionScheduler_ActionFactory::cron() WC 8.7.0

public function cron( $hook, $args = array(), $base_timestamp = null, $schedule = null, $group = '' ) {
	return $this->cron_unique( $hook, $args, $base_timestamp, $schedule, $group, false );
}