CaMykS  1.0-20231201
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CrontabEditor Class Reference

CronTab Editor library.
Allows websites to add/edit/remove cron jobs from Apache crontab. More...

Public Member Functions

 __construct ()
 
 __destruct ()
 
 __get ($variableName)
 
 load_jobs ()
 
 save_jobs ()
 
 check_jobExists ($identifier)
 
 check_taskExists ($task)
 
 get_newJob ($details=null, $identifier=null)
 
 set_job ($details, $identifier=null)
 
 delete_job ($identifier)
 
 delete_jobByTask ($task)
 
 get_jobIdentifierByTask ($task='')
 
 get_lastErrorCode ()
 
 get_lastErrorMessage ()
 

Private Member Functions

 set_lastError ($error)
 

Private Attributes

 $jobs = array()
 List of current crontab jobs. More...
 
 $hasChanged = false
 Stores if loaded crontab has changed. More...
 
 $lastError = 0
 Last error. More...
 

Detailed Description

CronTab Editor library.
Allows websites to add/edit/remove cron jobs from Apache crontab.

Engine / Object Library

Author
CaMykS Team camyk.nosp@m.s.co.nosp@m.ntact.nosp@m.@gma.nosp@m.il.co.nosp@m.m
Version
1.0.0.2
Date
Creation: Oct 2021
Modification: Feb 2022
Note
This program is distributed as is - WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Warning
This library is not loaded with CaMykS initialisation. CrontabEditor class.

Constructor & Destructor Documentation

◆ __construct()

CrontabEditor::__construct ( )

Class constructor.

Returns
void

◆ __destruct()

CrontabEditor::__destruct ( )

Class destructor.

Returns
void

Member Function Documentation

◆ __get()

CrontabEditor::__get (   $variableName)

Makes somevariables accessible in read-only

Parameters
string$variableName
Returns
mixed

◆ load_jobs()

CrontabEditor::load_jobs ( )

Load crontab jobs.

Returns
boolean success

◆ save_jobs()

CrontabEditor::save_jobs ( )

Save crontab jobs.

Returns
boolean success

◆ check_jobExists()

CrontabEditor::check_jobExists (   $identifier)

Check if job exists.

Parameters
string$identifier
Returns
boolean result

◆ check_taskExists()

CrontabEditor::check_taskExists (   $task)

Check if task exists.

Parameters
string$task
Returns
boolean result

◆ get_newJob()

CrontabEditor::get_newJob (   $details = null,
  $identifier = null 
)

Return new job.

Parameters
mixed$details
string$identifier
Returns
Object

◆ set_job()

CrontabEditor::set_job (   $details,
  $identifier = null 
)

Set job, by adding it or replacing existing one.

Parameters
mixed$details
string$identifier
Returns
success

◆ delete_job()

CrontabEditor::delete_job (   $identifier)

Delete job by identifier.

Parameters
string$identifier
Returns
success

◆ delete_jobByTask()

CrontabEditor::delete_jobByTask (   $task)

Delete job by task.

Parameters
string$task
Returns
success

◆ get_jobIdentifierByTask()

CrontabEditor::get_jobIdentifierByTask (   $task = '')

Return job identifier by task value.

Parameters
string$task
Returns
string

◆ get_lastErrorCode()

CrontabEditor::get_lastErrorCode ( )

Return last error code.

Returns
integer

◆ get_lastErrorMessage()

CrontabEditor::get_lastErrorMessage ( )

Return last error message.

Returns
string

◆ set_lastError()

CrontabEditor::set_lastError (   $error)
private

Define last error

Parameters
integer$error
Returns
void

Member Data Documentation

◆ $jobs

array CrontabEditor::$jobs = array()
private

List of current crontab jobs.

◆ $hasChanged

boolean CrontabEditor::$hasChanged = false
private

Stores if loaded crontab has changed.

◆ $lastError

integer CrontabEditor::$lastError = 0
private

Last error.


The documentation for this class was generated from the following file: