SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class Cron

Methods for initialising, recording the progress of, and finalising and cron scripts

Variables

NameVisibilityDescription
$job_id (static) 
$job_name (static) 
$pdo (static) 
$stmt_message (static) 

Functions

NameVisibilityDescription
exceptionHandlerpublic (static)Exception and error handling for CRON jobs
failurepublic (static)Report that a cron job failed.
messagepublic (static)Save and output log message for the currently running cron job
shutdownpublic (static)Shutdown function, for catching fatal errors
startpublic (static)Called at the beginning of a cron job.
successpublic (static)Report the successful completion of the cron job.

public exceptionHandler

void Cron::exceptionHandler ( mixed $exception );

Exception and error handling for CRON jobs

public failure

void Cron::failure ( [ mixed $message ] );

Report that a cron job failed.
Should be used with a return statement to end the execution of the job.

public message

void Cron::message ( [ string $message ] );

Save and output log message for the currently running cron job

public shutdown

void Cron::shutdown ( );

Shutdown function, for catching fatal errors

public start

unknown Cron::start ( mixed $job_name );

Called at the beginning of a cron job.

Checks for appropriate access permissions.
Creates a database record for the logging messages.

Note that this function opens an additional database connection, allowing logging
to continue to work even if the main script is using transactions - which it should be.

public success

void Cron::success ( );

Report the successful completion of the cron job.