Documentation

pm_Scheduler_Task
in package

Regular task representation.

Tags
since
11.0

Table of Contents

__construct()  : mixed
Create instance of task for scheduler
getArguments()  : array<string|int, mixed>
Return arguments of command to be executed
getCmd()  : string
Return command to be executed
getId()  : string
Return id of task
getModuleId()  : string
Return module identity of task
getSchedule()  : array<string|int, mixed>
Return schedule of task in associated array format
isActive()  : bool
Return task status
setArguments()  : void
Set arguments of command to be executed
setCmd()  : void
Set command to be executed
setSchedule()  : void
Schedules task to be executed at specified moment

Methods

__construct()

Create instance of task for scheduler

public __construct([Db_Table_Row_ScheduledTask|null $task = null ]) : mixed
Parameters
$task : Db_Table_Row_ScheduledTask|null = null

null for new task

Return values
mixed

getArguments()

Return arguments of command to be executed

public getArguments() : array<string|int, mixed>
Tags
since
11.5
Return values
array<string|int, mixed>

getCmd()

Return command to be executed

public getCmd() : string
Return values
string

getId()

Return id of task

public getId() : string
Return values
string

getModuleId()

Return module identity of task

public getModuleId() : string
Return values
string

getSchedule()

Return schedule of task in associated array format

public getSchedule() : array<string|int, mixed>
Return values
array<string|int, mixed>

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

isActive()

Return task status

public isActive() : bool
Tags
since
18.0.52
Return values
bool

setArguments()

Set arguments of command to be executed

public setArguments(array<string|int, mixed> $arguments) : void
Parameters
$arguments : array<string|int, mixed>
Tags
since
11.5
Return values
void

setCmd()

Set command to be executed

public setCmd(string $cmd) : void
Parameters
$cmd : string
Return values
void

setSchedule()

Schedules task to be executed at specified moment

public setSchedule(array<string|int, mixed> $schedule) : void
[
    'minute' => '*',
    'hour' => '*',
    'dom' => '*',
    'month' => '*',
    'dow' => '*',
]
Parameters
$schedule : array<string|int, mixed>

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

Return values
void

Search results