\pm_Scheduler_Task

Regular task representation.

Summary

Methods
Properties
Constants
__construct()
getId()
getCmd()
setCmd()
getArguments()
setArguments()
getSchedule()
setSchedule()
getModuleId()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A

Properties

Methods

__construct()

__construct(\Db_Table_Row_ScheduledTask  $task = null) 

Create instance of task for scheduler

Parameters

\Db_Table_Row_ScheduledTask $task

null for new task

getId()

getId() : string

Return id of task

Returns

string

getCmd()

getCmd() : string

Return command to be executed

Returns

string

setCmd()

setCmd(string  $cmd) 

Set command to be executed

Parameters

string $cmd

getArguments()

getArguments() : array

Return arguments of command to be executed

Returns

array

setArguments()

setArguments(array  $arguments) 

Set arguments of command to be executed

Parameters

array $arguments

getSchedule()

getSchedule() : array

Return schedule of task in associated array format

Returns

array —

Associated array with keys minute, hour, dom, month, dow

setSchedule()

setSchedule(array  $schedule) 

Schedules task to be executed at specified moment

[
    'minute' => '*',
    'hour' => '*',
    'dom' => '*',
    'month' => '*',
    'dow' => '*',
]

Parameters

array $schedule

Associated array with keys minute, hour, dom, month, dow

getModuleId()

getModuleId() : string

Return module identity of task

Returns

string