Menu

## ActionScheduler_ActionFactory
in package

ActionScheduler_ActionFactory.php : 6

Class ActionScheduler_ActionFactory

### Table of Contents

cron() : string
get_stored_action() : ActionScheduler_Action
recurring() : string
single() : string
store() : string

### Methods

#### cron()

ActionScheduler_ActionFactory.php : 91
`public cron(string $hook[, array<string|int, mixed> $args = array() ][, int $first = null ][, int $schedule = null ][, string $group = '' ]) : string`

##### Parameters

$hook : string

  The hook to trigger when this action runs

$args : array<string|int, mixed> = array()

  Args to pass when the hook is triggered

$first : int = null

  Unix timestamp for the first run

$schedule : int = null

  A cron definition string

$group : string = ''

  A group to put the action in

##### Return values

string —

The ID of the stored action

#### get_stored_action()

ActionScheduler_ActionFactory.php : 17
`public get_stored_action(string $status, string $hook[, array<string|int, mixed> $args = array() ][, ActionScheduler_Schedule $schedule = null ][, string $group = '' ]) : ActionScheduler_Action`

##### Parameters

$status : string

  The action's status in the data store

$hook : string

  The hook to trigger when this action runs

$args : array<string|int, mixed> = array()

  Args to pass to callbacks when the hook is triggered

$schedule : ActionScheduler_Schedule = null

  The action's schedule

$group : string = ''

  A group to put the action in

##### Return values

ActionScheduler_Action —

An instance of the stored action

#### recurring()

ActionScheduler_ActionFactory.php : 71
`public recurring(string $hook[, array<string|int, mixed> $args = array() ][, int $first = null ][, int $interval = null ][, string $group = '' ]) : string`

##### Parameters

$hook : string

  The hook to trigger when this action runs

$args : array<string|int, mixed> = array()

  Args to pass when the hook is triggered

$first : int = null

  Unix timestamp for the first run

$interval : int = null

  Seconds between runs

$group : string = ''

  A group to put the action in

##### Return values

string —

The ID of the stored action

#### single()

ActionScheduler_ActionFactory.php : 55
`public single(string $hook[, array<string|int, mixed> $args = array() ][, int $when = null ][, string $group = '' ]) : string`

##### Parameters

$hook : string

  The hook to trigger when this action runs

$args : array<string|int, mixed> = array()

  Args to pass when the hook is triggered

$when : int = null

  Unix timestamp when the action will run

$group : string = ''

  A group to put the action in

##### Return values

string —

The ID of the stored action

#### store()

ActionScheduler_ActionFactory.php : 107
`protected store(ActionScheduler_Action $action) : string`

##### Parameters

$action : ActionScheduler_Action

##### Return values

string —

The ID of the stored action

## Search results