See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401] [Versions 401 and 402] [Versions 401 and 403]
Cron functions.
Copyright: | 1999 onwards Martin Dougiamas http://dougiamas.com |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 473 lines (17 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
cron_run() X-Ref |
Execute cron tasks |
cron_run_scheduled_tasks(int $timenow) X-Ref |
Execute all queued scheduled tasks, applying necessary concurrency limits and time limits. param: int $timenow The time this process started. |
cron_run_adhoc_tasks(int $timenow, $keepalive = 0, $checklimits = true) X-Ref |
Execute all queued adhoc tasks, applying necessary concurrency limits and time limits. param: int $timenow The time this process started. param: int $keepalive Keep this function alive for N seconds and poll for new adhoc tasks. param: bool $checklimits Should we check limits? |
cron_run_inner_scheduled_task(\core\task\task_base $task) X-Ref |
Shared code that handles running of a single scheduled task within the cron. Not intended for calling directly outside of this library! param: \core\task\task_base $task |
cron_run_inner_adhoc_task(\core\task\adhoc_task $task) X-Ref |
Shared code that handles running of a single adhoc task within the cron. param: \core\task\adhoc_task $task |
cron_set_process_title(string $title) X-Ref |
Sets the process title This makes it very easy for a sysadmin to immediately see what task a cron process is running at any given moment. param: string $title process status title |
cron_trace_time_and_memory() X-Ref |
Output some standard information during cron runs. Specifically current time and memory usage. This method also does gc_collect_cycles() (before displaying memory usage) to try to help PHP manage memory better. |
cron_prepare_core_renderer($restore = false) X-Ref |
Prepare the output renderer for the cron run. This involves creating a new $PAGE, and $OUTPUT fresh for each task and prevents any one task from influencing any other. param: bool $restore Whether to restore the original PAGE and OUTPUT |