MDL-63580 core_task: Deprecation CLI scripts from admin/tool/task/cli
Copy the CLI scripts from admin/tool/task/cli to admin/cli (schedule_task.php and adhoc_task.php) and rename to scheduled_task.php and to improve in order to use cron_run_inner_scheduled_task.
This commit is contained in:
@@ -17,6 +17,9 @@
|
||||
/**
|
||||
* CLI task execution.
|
||||
*
|
||||
* @deprecated since Moodle 3.9 MDL-63580. Please use the admin/cli/schedule_task.php.
|
||||
* @todo final deprecation. To be removed in Moodle 4.3 MDL-63594.
|
||||
*
|
||||
* @package tool_task
|
||||
* @copyright 2014 Petr Skoda
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
@@ -33,6 +36,8 @@ list($options, $unrecognized) = cli_get_params(
|
||||
array('h' => 'help')
|
||||
);
|
||||
|
||||
debugging('admin/tool/task/cli/schedule_task.php is deprecated. Please use admin/cli/scheduled_task.php instead.', DEBUG_DEVELOPER);
|
||||
|
||||
if ($unrecognized) {
|
||||
$unrecognized = implode("\n ", $unrecognized);
|
||||
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
|
||||
@@ -65,6 +70,7 @@ if ($options['showdebugging']) {
|
||||
if ($options['showsql']) {
|
||||
$DB->set_debug(true);
|
||||
}
|
||||
|
||||
if ($options['list']) {
|
||||
cli_heading("List of scheduled tasks ($CFG->wwwroot)");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user