Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Static Public Member Functions | Static Protected Member Functions | List of all members
tool_task\run_from_cli Class Reference

Running tasks from CLI. More...

Static Public Member Functions

static execute (\core\task\task_base $task)
 Executes a cron from web invocation using PHP CLI. More...
 
static is_runnable ()
 Returns if Moodle have access to PHP CLI binary or not. More...
 

Static Protected Member Functions

static find_php_cli_path ()
 Find the path of PHP CLI binary. More...
 

Detailed Description

Running tasks from CLI.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ execute()

static tool_task\run_from_cli::execute ( \core\task\task_base  $task)
static

Executes a cron from web invocation using PHP CLI.

Parameters
core::task::task_base$taskTask that be executed via CLI.
Return values
bool
Exceptions
moodle_exception

◆ find_php_cli_path()

static tool_task\run_from_cli::find_php_cli_path ( )
staticprotected

Find the path of PHP CLI binary.

Return values
string|falseThe PHP CLI executable PATH

◆ is_runnable()

static tool_task\run_from_cli::is_runnable ( )
static

Returns if Moodle have access to PHP CLI binary or not.

Return values
bool

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