Function __global->cron_run
Definitions
sources/cron.php
- Run scheduled tasks.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $force | boolean | No | No | False | N/A | N/A | Whether to forcefully run locked hooks |
| $verbose | boolean | No | No | False | N/A | N/A | Whether to output additional information, mainly for debugging |
| $limit_hooks | ?array | No | No | Null | N/A | N/A | Only run the defined hooks (null: run all of them) |
| $include_msn | boolean | No | No | False | N/A | N/A | Whether to also call the Cron bridges of custom shares |
| $loop | boolean | No | No | False | N/A | N/A | Whether to loop execution |
| $loop_wait_seconds | integer | No | No | 3 | N/A | N/A | The number of seconds to wait between loops |
| $loop_max_seconds | integer | No | No | 3595 | N/A | N/A | Terminate looping after this many seconds |
| $echo_out | boolean | No | No | False | N/A | N/A | Echo the log as it happens instead of only returning it at the end of execution |
Returns
- Various debugging / logging of the process
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Run scheduled tasks.
*
* @param boolean $force Whether to forcefully run locked hooks
* @param boolean $verbose Whether to output additional information, mainly for debugging
* @param ?array $limit_hooks Only run the defined hooks (null: run all of them)
* @param boolean $include_msn Whether to also call the Cron bridges of custom shares
* @param boolean $loop Whether to loop execution
* @param integer $loop_wait_seconds The number of seconds to wait between loops
* @param integer $loop_max_seconds Terminate looping after this many seconds
* @param boolean $echo_out Echo the log as it happens instead of only returning it at the end of execution
* @return string Various debugging / logging of the process
*/
function cron_run(bool $force = false, bool $verbose = false, ?array $limit_hooks = null, bool $include_msn = false, bool $loop = false, int $loop_wait_seconds = 3, int $loop_max_seconds = 3595, bool $echo_out = false) : string
* Run scheduled tasks.
*
* @param boolean $force Whether to forcefully run locked hooks
* @param boolean $verbose Whether to output additional information, mainly for debugging
* @param ?array $limit_hooks Only run the defined hooks (null: run all of them)
* @param boolean $include_msn Whether to also call the Cron bridges of custom shares
* @param boolean $loop Whether to loop execution
* @param integer $loop_wait_seconds The number of seconds to wait between loops
* @param integer $loop_max_seconds Terminate looping after this many seconds
* @param boolean $echo_out Echo the log as it happens instead of only returning it at the end of execution
* @return string Various debugging / logging of the process
*/
function cron_run(bool $force = false, bool $verbose = false, ?array $limit_hooks = null, bool $include_msn = false, bool $loop = false, int $loop_wait_seconds = 3, int $loop_max_seconds = 3595, bool $echo_out = false) : string
