NextDom\Model\Entity\Cron
Cron
Synopsis
class Cron
extends BaseEntity
{
- // constants
- const TABLE_NAME = NextDomObj::CRON;
- // Inherited constants from BaseEntity
- const TABLE_NAME = '';
- // Inherited constants from BaseModel
- const TABLE_NAME = '';
- // members
- protected string $class = '';
- protected $function;
- protected string $schedule = '';
- protected $timeout;
- protected integer $deamon = 0;
- protected $deamonSleepTime;
- protected $option;
- protected integer $once = 0;
- // Inherited members from BaseEntity
- protected $id;
- // Inherited members from BaseModel
- protected bool $_changed;
- // methods
- public int getEnable()
- public int getTimeout()
- public $this setTimeout()
- public int getDeamon()
- public $this setDeamon()
- public int|mixed getDeamonSleepTime()
- public $this setDeamonSleepTime()
- public int getOnce()
- public $this setOnce()
- public void preSave()
- public string getFunction()
- public $this setFunction()
- public string getSchedule()
- public $this setSchedule()
- public mixed getOption()
- public $this setOption()
- public string getClass()
- public $this setClass()
- public void postInsert()
- public void setState()
- public void setCache()
- public void setPID()
- public mixed save()
- public mixed remove()
- public bool running()
- public mixed getState()
- public mixed getCache()
- public mixed getPID()
- public void halt()
- public void start()
- public void run()
- public bool refresh()
- public void stop()
- public bool isDue()
- public mixed getLastRun()
- public bool|string getNextRunDate()
- public string getName()
- public array toArray()
- public void setLastRun()
- // Inherited methods from BaseModel
- public bool getChanged()
- public $this setChanged()
- public void updateChangeState()
- public string getTableName()
- public void save()
- public void remove()
- // Inherited methods from EnableEntity
- public abstract void updateChangeState()
- public int getEnable()
- public $this setEnable()
- public bool isEnabled()
Hierarchy
Constants
Name | Value |
---|---|
TABLE_NAME | NextDomObj::CRON |
TABLE_NAME | '' |
TABLE_NAME | '' |
Members
protected
- $_changed — NextDom\Model\Entity\Parents\bool
- $class — string
- $deamon — integer
- $deamonSleepTime — integer
- $enable — integer
- $function — string
- $id — integer
- $once — integer
- $option — string
- $schedule — string
- $timeout — integer
Methods
public
- getCache() — Get task data in cache
- getClass()
- getDeamon()
- getDeamonSleepTime()
- getEnable() — Get enabled state of the cron task
- getFunction()
- getLastRun() — Get last task run
- getName() — Get human name of cron
- getNextRunDate() — Get date of the next task run
- getOnce()
- getOption()
- getPID() — Get task PID
- getSchedule()
- getState() — Get current state
- getTimeout() — Get timeout of the task If timeout is not configured, return default value from
- halt() — Stop immediatly cron (this method must be only call by jeecron master)
- isDue() — Check if it's time to launch cron
- postInsert() — Stop task after insert in database
- preSave() — Check if cron object is valid before save
- refresh() — Refresh DB state of this cron
- remove() — Remove cron object from the database
- run() — Launch cron (this method must be only call by jeeCron master)
- running() — Check if this cron is currently running
- save() — Save cron object in database
- setCache() — Store task data in cache
- setClass()
- setDeamon()
- setDeamonSleepTime()
- setFunction()
- setLastRun() — Set last task run
- setOnce()
- setOption()
- setPID() — Store PID in cache
- setSchedule()
- setState() — Set task state
- setTimeout()
- start() — Start cron task
- stop() — Stop task
- toArray() — Get cron data in array
Inherited from NextDom\Model\Entity\Parents\BaseEntity
public
Inherited from NextDom\Model\Entity\Parents\BaseModel
public
- getChanged() — Get changed state
- getTableName()
- remove() — Remove the entity from the database
- save() — Save the entity in the database
- setChanged() — Set changed state
- updateChangeState() — Update change state if values are different
Inherited from NextDom\Model\Entity\Parents\EnableEntity
public
- getEnable()
- isEnabled() — Get bool enabled state
- setEnable()
- updateChangeState()