Methods for initialising, recording the progress of, and finalising and cron scripts
This is the code documentation for the SproutCMS project
Search documentation |
class CronMethods for initialising, recording the progress of, and finalising and cron scripts
Extending this class<?php
/**
* New class description goes here
*
* @author Your Name, 2025-10-30
**/
class NewClassName extends Cron {
/**
* 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 function start ($job_name) {
// Method code goes here
}
/**
* Save and output log message for the currently running cron job
**/
public function message (string $message) {
// Method code goes here
}
/**
* Report that a cron job failed.
* Should be used with a return statement to end the execution of the job.
**/
public function failure ($message) {
// Method code goes here
}
/**
* Report the successful completion of the cron job.
**/
public function success () {
// Method code goes here
}
/**
* Exception and error handling for CRON jobs
**/
public function exceptionHandler ($exception) {
// Method code goes here
}
/**
* Shutdown function, for catching fatal errors
**/
public function shutdown () {
// Method code goes here
}
}
?>
|
| Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Monday, 3rd April, 2023 at 02:59 pm |
|