cron
in package
Table of Contents
Properties
- $_changed : mixed
- $class : mixed
- $deamon : mixed
- $deamonSleepTime : mixed
- $enable : mixed
- $function : mixed
- $id : mixed
- $once : mixed
- $option : mixed
- $schedule : mixed
- $timeout : mixed
Methods
- all() : array<string|int, mixed>
- Return an array of all cron object
- byClassAndFunction() : object
- Return cron object corresponding to parameters
- byId() : object
- Get cron object associate to id
- clean() : mixed
- convertDateToCron() : mixed
- getCache() : mixed
- getChanged() : mixed
- getClass() : mixed
- getDeamon() : mixed
- getDeamonSleepTime() : mixed
- getEnable() : mixed
- getFunction() : mixed
- getId() : mixed
- getLastRun() : mixed
- getName() : string
- Get human name of cron
- getNextRunDate() : mixed
- getOnce() : mixed
- getOption() : mixed
- getPID() : mixed
- getPidFile() : int
- Return the current pid of jeecron or empty if not running
- getSchedule() : mixed
- getState() : mixed
- getTimeout() : mixed
- halt() : mixed
- isDue() : bool
- Check if it's time to launch cron
- jeeCronRun() : bool
- Return state of jeecron master
- loadAvg() : array<string|int, mixed>
- Return array of load average
- nbCronRun() : int
- Return number of cron running
- nbProcess() : int
- Return number of process on system
- postInsert() : mixed
- preSave() : mixed
- Check if cron object is valid before save
- refresh() : bool
- Refresh DB state of this cron
- remove() : bool
- Remove cron object
- run() : mixed
- Launch cron (this method must be only call by jeecron master)
- running() : bool
- Check if this cron is currently running
- save() : bool
- Save cron object
- searchClassAndFunction() : array<string|int, cron>
- setCache() : mixed
- setChanged() : mixed
- setClass() : mixed
- setDeamon() : mixed
- setDeamonSleepTime() : mixed
- setEnable() : mixed
- setFunction() : mixed
- setId() : mixed
- setLastRun() : mixed
- setOnce() : mixed
- setOption() : mixed
- setPID() : mixed
- setPidFile() : mixed
- Set jeecron pid of current process
- setSchedule() : mixed
- setState() : mixed
- setTimeout() : mixed
- start() : mixed
- Set cron to be start
- stop() : mixed
- toArray() : mixed
Properties
$_changed
private
mixed
$_changed
= \false
$class
private
mixed
$class
= ''
$deamon
private
mixed
$deamon
= 0
$deamonSleepTime
private
mixed
$deamonSleepTime
$enable
private
mixed
$enable
= 1
$function
private
mixed
$function
$id
private
mixed
$id
$once
private
mixed
$once
= 0
$option
private
mixed
$option
$schedule
private
mixed
$schedule
= ''
$timeout
private
mixed
$timeout
Methods
all()
Return an array of all cron object
public
static all([mixed $_order = false ]) : array<string|int, mixed>
Parameters
- $_order : mixed = false
Return values
array<string|int, mixed>byClassAndFunction()
Return cron object corresponding to parameters
public
static byClassAndFunction(string $_class, string $_function[, string $_option = '' ]) : object
Parameters
- $_class : string
- $_function : string
- $_option : string = ''
Return values
objectbyId()
Get cron object associate to id
public
static byId(int $_id) : object
Parameters
- $_id : int
Return values
objectclean()
public
static clean() : mixed
convertDateToCron()
public
static convertDateToCron(mixed $_date) : mixed
Parameters
- $_date : mixed
getCache()
public
getCache([mixed $_key = '' ][, mixed $_default = '' ]) : mixed
Parameters
- $_key : mixed = ''
- $_default : mixed = ''
getChanged()
public
getChanged() : mixed
getClass()
public
getClass() : mixed
getDeamon()
public
getDeamon() : mixed
getDeamonSleepTime()
public
getDeamonSleepTime() : mixed
getEnable()
public
getEnable([mixed $_default = 0 ]) : mixed
Parameters
- $_default : mixed = 0
getFunction()
public
getFunction() : mixed
getId()
public
getId() : mixed
getLastRun()
public
getLastRun() : mixed
getName()
Get human name of cron
public
getName() : string
Return values
stringgetNextRunDate()
public
getNextRunDate() : mixed
getOnce()
public
getOnce([mixed $_default = 0 ]) : mixed
Parameters
- $_default : mixed = 0
getOption()
public
getOption() : mixed
getPID()
public
getPID([mixed $_default = null ]) : mixed
Parameters
- $_default : mixed = null
getPidFile()
Return the current pid of jeecron or empty if not running
public
static getPidFile() : int
Return values
intgetSchedule()
public
getSchedule() : mixed
getState()
public
getState() : mixed
getTimeout()
public
getTimeout() : mixed
halt()
public
halt() : mixed
isDue()
Check if it's time to launch cron
public
isDue([mixed $_datetime = null ]) : bool
Parameters
- $_datetime : mixed = null
Return values
booljeeCronRun()
Return state of jeecron master
public
static jeeCronRun() : bool
Return values
boolloadAvg()
Return array of load average
public
static loadAvg() : array<string|int, mixed>
Return values
array<string|int, mixed>nbCronRun()
Return number of cron running
public
static nbCronRun() : int
Return values
intnbProcess()
Return number of process on system
public
static nbProcess() : int
Return values
intpostInsert()
public
postInsert() : mixed
preSave()
Check if cron object is valid before save
public
preSave() : mixed
Tags
refresh()
Refresh DB state of this cron
public
refresh() : bool
Return values
boolremove()
Remove cron object
public
remove([mixed $halt_before = true ]) : bool
Parameters
- $halt_before : mixed = true
Return values
boolrun()
Launch cron (this method must be only call by jeecron master)
public
run([mixed $_noErrorReport = false ]) : mixed
Parameters
- $_noErrorReport : mixed = false
Tags
running()
Check if this cron is currently running
public
running() : bool
Return values
boolsave()
Save cron object
public
save() : bool
Return values
boolsearchClassAndFunction()
public
static searchClassAndFunction(string $_class, string $_function[, string|array<string|int, mixed> $_option = '' ]) : array<string|int, cron>
Parameters
- $_class : string
- $_function : string
- $_option : string|array<string|int, mixed> = ''
Return values
array<string|int, cron>setCache()
public
setCache(mixed $_key[, mixed $_value = null ]) : mixed
Parameters
- $_key : mixed
- $_value : mixed = null
setChanged()
public
setChanged(mixed $_changed) : mixed
Parameters
- $_changed : mixed
setClass()
public
setClass(mixed $_class) : mixed
Parameters
- $_class : mixed
setDeamon()
public
setDeamon(mixed $_deamons) : mixed
Parameters
- $_deamons : mixed
setDeamonSleepTime()
public
setDeamonSleepTime(mixed $_deamonSleepTime) : mixed
Parameters
- $_deamonSleepTime : mixed
setEnable()
public
setEnable(mixed $_enable) : mixed
Parameters
- $_enable : mixed
setFunction()
public
setFunction(mixed $_function) : mixed
Parameters
- $_function : mixed
setId()
public
setId(mixed $_id) : mixed
Parameters
- $_id : mixed
setLastRun()
public
setLastRun(mixed $lastRun) : mixed
Parameters
- $lastRun : mixed
setOnce()
public
setOnce(mixed $_once) : mixed
Parameters
- $_once : mixed
setOption()
public
setOption(mixed $_option) : mixed
Parameters
- $_option : mixed
setPID()
public
setPID([mixed $pid = null ]) : mixed
Parameters
- $pid : mixed = null
setPidFile()
Set jeecron pid of current process
public
static setPidFile() : mixed
setSchedule()
public
setSchedule(mixed $_schedule) : mixed
Parameters
- $_schedule : mixed
setState()
public
setState(mixed $state) : mixed
Parameters
- $state : mixed
setTimeout()
public
setTimeout(mixed $_timeout) : mixed
Parameters
- $_timeout : mixed
start()
Set cron to be start
public
start() : mixed
stop()
public
stop() : mixed
toArray()
public
toArray() : mixed