WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

as_schedule_cron_action() WC 1.0

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

Хуков нет.

Возвращает

Число. The action ID.

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

as_schedule_cron_action( $timestamp, $schedule, $hook, $args, $group );
$base_timestamp(число) (обязательный)
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.
$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)

Код as schedule cron action: woocommerce/packages/action-scheduler/functions.php WC 4.3.2

<?php
function as_schedule_cron_action( $timestamp, $schedule, $hook, $args = array(), $group = '' ) {
	if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) {
		return 0;
	}
	return ActionScheduler::factory()->cron( $hook, $args, $timestamp, $schedule, $group );
}