Public Member Functions | Static Public Member Functions | Public Attributes

CronJob Class Reference

Inheritance diagram for CronJob:
Collaboration diagram for CronJob:

List of all members.

Public Member Functions

 __construct ($paramarray=array())
 execute ()
 __set ($name, $value)
 __get ($name)
 insert ()
 update ()
 delete ()

Static Public Member Functions

static default_fields ()

Public Attributes

const CRON_SYSTEM = 1
const CRON_THEME = 2
const CRON_PLUGIN = 4
const CRON_CUSTOM = 8

Detailed Description

Definition at line 24 of file cronjob.php.


Constructor & Destructor Documentation

CronJob::__construct ( paramarray = array()  ) 

Constructor for the CronJob class.

See also:
QueryRecord::__construct()
Parameters:
array $paramarray an associative array or querystring of initial field values

Reimplemented from QueryRecord.

Definition at line 70 of file cronjob.php.


Member Function Documentation

CronJob::__get ( name  ) 

Magic property getter to get the cronjob properties. Unserializes the callback if called.

See also:
QueryRecord::__get()
Parameters:
string $name The name of the property to get.
Returns:
mixed The value of the property, or null if no property by that name.

Reimplemented from QueryRecord.

Definition at line 222 of file cronjob.php.

CronJob::__set ( name,
value 
)

Magic property setter to set the cronjob properties. Serializes the callback if needed.

See also:
QueryRecord::__set()
Parameters:
string $name The name of the property to set.
mixed $value The value of the property to set.
Returns:
mixed The new value of the property.

Reimplemented from QueryRecord.

Definition at line 194 of file cronjob.php.

static CronJob::default_fields (  )  [static]

Returns the defined database columns for a cronjob.

Returns:
array Array of default columns in the crontab table

Definition at line 44 of file cronjob.php.

CronJob::delete (  ) 

Deletes an existing cron job.

See also:
QueryRecord::deleteRecord()
Returns:
bool If the delete was successful

Reimplemented from QueryRecord.

Definition at line 261 of file cronjob.php.

CronJob::execute (  ) 

Runs this job.

Executes the Cron Job callback. Deletes the Cron Job if end_time is reached or if it failed to execute the last # consecutive attempts. Also sends notification by email to specified address. Note: end_time can be null, ie. "The Never Ending Cron Job".

Callback is passed a param_array of the Cron Job fields and the execution time as the 'now' field. The 'result' field contains the result of the last execution; either 'executed' or 'failed'.

Todo:
send notification of execution/failure.

Definition at line 109 of file cronjob.php.

CronJob::insert (  ) 

Saves a new cron job to the crontab table.

See also:
QueryRecord::insertRecord()
Returns:
CronJob The newly inserted cron job, or false if failed.

Reimplemented from QueryRecord.

Definition at line 239 of file cronjob.php.

CronJob::update (  ) 

Updates an existing cron job to the crontab table.

See also:
QueryRecord::updateRecord()
Returns:
CronJob The updated cron job, or false if failed.

Reimplemented from QueryRecord.

Definition at line 250 of file cronjob.php.

Referenced by execute().


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