as_schedule_cron_action( $timestamp, string $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
- $base_timestamp
-
(Required) 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
-
(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
(int) The action ID.
Source Source
File: packages/action-scheduler/functions.php