ActionScheduler_ActionFactory::cron( string $hook, array $args = array(), int $base_timestamp = null, int $schedule = null, string $group = '' )
Create the first instance of an action recurring on a Cron schedule.
Description Description
Parameters Parameters
- $hook
-
(Required) The hook to trigger when this action runs
- $args
-
(Optional) Args to pass when the hook is triggered
Default value: array()
- $base_timestamp
-
(Optional) 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.
Default value: null
- $schedule
-
(Optional) A cron definition string
Default value: null
- $group
-
(Optional) A group to put the action in
Default value: ''
Return Return
(int) The ID of the stored action
Source Source
File: packages/action-scheduler/classes/ActionScheduler_ActionFactory.php