WC_Action_Queue::schedule_cron( int $timestamp, string $cron_schedule, string $hook, array $args = array(), string $group = '' )
Schedule an action that recurs on a cron-like schedule.
Description Description
See also See also
- 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)
Parameters Parameters
- $timestamp
-
(Required) The schedule will start on or after this time.
- $cron_schedule
-
(Required) A cron-link schedule string.
- $hook
-
(Required) The hook to trigger.
- $args
-
(Optional) Arguments to pass when the hook triggers.
Default value: array()
- $group
-
(Optional) The group to assign this job to.
Default value: ''
Return Return
(string) The action ID
Source Source
File: includes/queue/class-wc-action-queue.php
public function schedule_cron( $timestamp, $cron_schedule, $hook, $args = array(), $group = '' ) { return as_schedule_cron_action( $timestamp, $cron_schedule, $hook, $args, $group ); }