pm_Scheduler
in package
Manager of regular tasks for module.
Tags
Table of Contents
- $EVERY_10_MIN : mixed
- $EVERY_5_MIN : mixed
- $EVERY_DAY : mixed
- $EVERY_HOUR : mixed
- $EVERY_MIN : mixed
- $EVERY_MONTH : mixed
- $EVERY_WEEK : mixed
- __construct() : mixed
- Create new manager of regular tasks
- disableTask() : void
- Disable task
- enableTask() : void
- Enable task
- getInstance() : pm_Scheduler
- Get instance of pm_Scheduler
- getTaskById() : pm_Scheduler_Task
- Return task by its id
- listTasks() : array<string|int, pm_Scheduler_Task>
- List all tasks of current module
- putTask() : void
- Update or add new task to scheduler
- removeAllTasks() : void
- Remove all tasks of current module
- removeTask() : void
- Remove task from scheduler
- resetInstance() : void
- Reset the singleton instance
Properties
$EVERY_10_MIN
public
static mixed
$EVERY_10_MIN
= ['0,9,19,29,39,49,59', '*', '*', '*', '*']
$EVERY_5_MIN
public
static mixed
$EVERY_5_MIN
= ['0,4,9,14,19,24,29,34,39,44,49,54,59', '*', '*', '*', '*']
$EVERY_DAY
public
static mixed
$EVERY_DAY
= ['0', '0', '*', '*', '*']
$EVERY_HOUR
public
static mixed
$EVERY_HOUR
= ['0', '*', '*', '*', '*']
$EVERY_MIN
public
static mixed
$EVERY_MIN
= ['*', '*', '*', '*', '*']
$EVERY_MONTH
public
static mixed
$EVERY_MONTH
= ['0', '0', '1', '*', '*']
$EVERY_WEEK
public
static mixed
$EVERY_WEEK
= ['0', '0', '*', '*', '0']
Methods
__construct()
Create new manager of regular tasks
public
__construct() : mixed
Return values
mixed —disableTask()
Disable task
public
disableTask(pm_Scheduler_Task $task) : void
Parameters
- $task : pm_Scheduler_Task
Tags
Return values
void —enableTask()
Enable task
public
enableTask(pm_Scheduler_Task $task) : void
Parameters
- $task : pm_Scheduler_Task
Tags
Return values
void —getInstance()
Get instance of pm_Scheduler
public
static getInstance() : pm_Scheduler
Return values
pm_Scheduler —getTaskById()
Return task by its id
public
getTaskById(string $taskId) : pm_Scheduler_Task
Parameters
- $taskId : string
Return values
pm_Scheduler_Task —listTasks()
List all tasks of current module
public
listTasks() : array<string|int, pm_Scheduler_Task>
Return values
array<string|int, pm_Scheduler_Task> —putTask()
Update or add new task to scheduler
public
putTask(pm_Scheduler_Task $task) : void
Parameters
- $task : pm_Scheduler_Task
Tags
Return values
void —removeAllTasks()
Remove all tasks of current module
public
removeAllTasks() : void
Return values
void —removeTask()
Remove task from scheduler
public
removeTask(pm_Scheduler_Task $task) : void
Parameters
- $task : pm_Scheduler_Task
Tags
Return values
void —resetInstance()
Reset the singleton instance
public
static resetInstance() : void