WC_Queue_Interface::schedule_cron()publicWC 1.0

Schedule an action that recurs on a cron-like schedule.

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

Хуков нет.

Возвращает

Строку. The action ID

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

$WC_Queue_Interface = new WC_Queue_Interface();
$WC_Queue_Interface->schedule_cron( $timestamp, $cron_schedule, $hook, $args, $group );
$timestamp(int) (обязательный)
The schedule will start on or after this time.
$cron_schedule(строка) (обязательный)
A cron-link schedule string.
$hook(строка) (обязательный)
The hook to trigger.
$args(массив)
Arguments to pass when the hook triggers.
По умолчанию: array()
$group(строка)
The group to assign this job to.
По умолчанию: ''

Заметки

  • Смотрите: http://en.wikipedia.org/wiki/Cron

    ┬ ┬ ┬ ┬ ┬ ┬
    | | | | | |
    | | | | | + year [optional]
    | | | | +----- day of week (0 - 7) (Sunday=0 or 7)
    | | | +---------- month (1 - 12)
    | | +--------------- day of month (1 - 31)
    | +-------------------- hour (0 - 23)
    +------------------------- min (0 - 59)

Код WC_Queue_Interface::schedule_cron() WC 8.7.0

public function schedule_cron( $timestamp, $cron_schedule, $hook, $args = array(), $group = '' );