Documentation

ActionScheduler_ActionFactory
in package

Class ActionScheduler_ActionFactory

Table of Contents

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

Methods

cron()

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()

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()

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()

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

Search results