Class CronJobDBPDO
Class implementing database functions: PDO MySQL
-
mplx\toolkit\cronjob\CronjobDBAbstract
-
mplx\toolkit\cronjob\CronJobDBPDO
Methods summary
protected
|
#
initializeDB( mixed $cfg )
Initialize database connection
Initialize database connection
Parameters
|
public
|
#
createTable( )
Creates database table to hold cronjobs
Creates database table to hold cronjobs
helper function for easy creation of database table
|
protected
|
#
registerJobDB( string $jobid, integer $interval, string $cmd )
Register new cronjob
Parameters
- $jobid
string $jobid unique job identifier
- $interval
integer $interval interval in seconds
- $cmd
string $cmd commandline
|
protected
|
#
unregisterJobDB( string $jobid )
Unregister (delete) cronjob
Unregister (delete) cronjob
Parameters
- $jobid
string $jobid unique job identifier
|
protected
|
#
setEnabledDB( string $jobid, boolean $enabled )
Enable/Disable cronjob
Parameters
- $jobid
string $jobid unique job identifier
- $enabled
boolean $enabled enable(true) or disable(false)
|
protected
|
#
setLockDB( string $jobid, boolean $locked )
Lock/Unlock cronjob
Parameters
- $jobid
string $jobid unique job identifier
- $locked
boolean $locked lock(true) or unlock(false)
|
protected
|
#
scheduleJobDB( string $jobid, mixed $ts )
Schedule next execution
Parameters
- $jobid
string $jobid unique job identifier
- $ts
mixed $ts timestamp
|
protected
|
#
getJobStatusDB( string $jobid )
Retrieve cronjob status
Parameters
- $jobid
string $jobid unique job identifier
|
protected
|
#
getJobsDB( mixed $flags = '', mixed $sort = '' )
Retrieve list of all cronjobs
Retrieve list of all cronjobs
Parameters
- $flags
mixed $flags filtering with custom sql WHERE clause
- $sort
mixed $sort sorting with custom sql ORDER BY
|