mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 10:56:56 +02:00
Merge branch 'MDL-55141' of https://github.com/creator23/moodle
This commit is contained in:
commit
8942afa981
1 changed files with 10 additions and 1 deletions
|
@ -29,7 +29,7 @@ require_once("$CFG->libdir/clilib.php");
|
||||||
require_once("$CFG->libdir/cronlib.php");
|
require_once("$CFG->libdir/cronlib.php");
|
||||||
|
|
||||||
list($options, $unrecognized) = cli_get_params(
|
list($options, $unrecognized) = cli_get_params(
|
||||||
array('help' => false, 'list' => false, 'execute' => false),
|
array('help' => false, 'list' => false, 'execute' => false, 'showsql' => false, 'showdebugging' => false),
|
||||||
array('h' => 'help')
|
array('h' => 'help')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -45,6 +45,8 @@ if ($options['help'] or (!$options['list'] and !$options['execute'])) {
|
||||||
Options:
|
Options:
|
||||||
--execute=\\\\some\\\\task Execute scheduled task manually
|
--execute=\\\\some\\\\task Execute scheduled task manually
|
||||||
--list List all scheduled tasks
|
--list List all scheduled tasks
|
||||||
|
--showsql Show sql queries before they are executed
|
||||||
|
--showdebugging Show developer level debugging information
|
||||||
-h, --help Print out this help
|
-h, --help Print out this help
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
@ -56,6 +58,13 @@ Example:
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($options['showdebugging']) {
|
||||||
|
set_debugging(DEBUG_DEVELOPER, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($options['showsql']) {
|
||||||
|
$DB->set_debug(true);
|
||||||
|
}
|
||||||
if ($options['list']) {
|
if ($options['list']) {
|
||||||
cli_heading("List of scheduled tasks ($CFG->wwwroot)");
|
cli_heading("List of scheduled tasks ($CFG->wwwroot)");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue