2014-02-25 09:47:39 +08:00
|
|
|
<?php
|
|
|
|
// This file is part of Moodle - http://moodle.org/
|
|
|
|
//
|
|
|
|
// Moodle is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// Moodle is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Definition of core scheduled tasks.
|
|
|
|
*
|
|
|
|
* The handlers defined on this file are processed and registered into
|
|
|
|
* the Moodle DB after any install or upgrade operation. All plugins
|
|
|
|
* support this.
|
|
|
|
*
|
|
|
|
* @package core
|
|
|
|
* @category task
|
|
|
|
* @copyright 2013 Damyon Wiese
|
|
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
|
|
*/
|
|
|
|
|
|
|
|
defined('MOODLE_INTERNAL') || die();
|
|
|
|
|
|
|
|
/* List of handlers */
|
|
|
|
|
|
|
|
$tasks = array(
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\session_cleanup_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '*',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\delete_unconfirmed_users_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '0',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\delete_incomplete_users_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '5',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\backup_cleanup_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '10',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\tag_cron_task',
|
|
|
|
'blocking' => 0,
|
2015-10-02 23:13:44 +08:00
|
|
|
'minute' => 'R',
|
|
|
|
'hour' => '3',
|
2014-02-25 09:47:39 +08:00
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\context_cleanup_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '25',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\cache_cleanup_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '30',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\messaging_cleanup_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '35',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\send_new_user_passwords_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '*',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\send_failed_login_notifications_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '*',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\create_contexts_task',
|
|
|
|
'blocking' => 1,
|
2015-02-23 14:26:58 +08:00
|
|
|
'minute' => '0',
|
|
|
|
'hour' => '0',
|
2014-02-25 09:47:39 +08:00
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\grade_cron_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '*',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
2019-03-15 12:03:10 +08:00
|
|
|
array(
|
|
|
|
'classname' => 'core\task\grade_history_cleanup_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '*',
|
|
|
|
'hour' => '0',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
2014-02-25 09:47:39 +08:00
|
|
|
array(
|
2015-08-27 14:36:38 +01:00
|
|
|
'classname' => 'core\task\completion_regular_task',
|
2014-02-25 09:47:39 +08:00
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '*',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
2015-05-20 13:08:19 +01:00
|
|
|
array(
|
2015-08-27 14:36:38 +01:00
|
|
|
'classname' => 'core\task\completion_daily_task',
|
2015-05-20 13:08:19 +01:00
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => 'R',
|
|
|
|
'hour' => 'R',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
2014-02-25 09:47:39 +08:00
|
|
|
array(
|
|
|
|
'classname' => 'core\task\portfolio_cron_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '*',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\plagiarism_cron_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '*',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\calendar_cron_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '*',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\blog_cron_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '*',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
2019-03-28 16:15:37 +08:00
|
|
|
'classname' => 'core\task\question_preview_cleanup_task',
|
2014-02-25 09:47:39 +08:00
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '*',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\registration_cron_task',
|
|
|
|
'blocking' => 0,
|
2015-02-04 09:19:00 +01:00
|
|
|
'minute' => 'R',
|
|
|
|
'hour' => 'R',
|
2014-02-25 09:47:39 +08:00
|
|
|
'day' => '*',
|
2015-02-04 09:19:00 +01:00
|
|
|
'dayofweek' => 'R',
|
2014-02-25 09:47:39 +08:00
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\check_for_updates_task',
|
|
|
|
'blocking' => 0,
|
2022-02-06 21:53:44 +01:00
|
|
|
'minute' => 'R',
|
|
|
|
'hour' => 'R',
|
2014-02-25 09:47:39 +08:00
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\cache_cron_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '50',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\automated_backup_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '50',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\badges_cron_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '*/5',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
2019-04-04 09:14:45 +08:00
|
|
|
array(
|
|
|
|
'classname' => 'core\task\badges_message_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '*/5',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
2014-02-25 09:47:39 +08:00
|
|
|
array(
|
|
|
|
'classname' => 'core\task\file_temp_cleanup_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '55',
|
|
|
|
'hour' => '*/6',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\file_trash_cleanup_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '55',
|
|
|
|
'hour' => '*/6',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
2016-01-27 17:54:17 +08:00
|
|
|
array(
|
2016-03-03 10:56:00 -05:00
|
|
|
'classname' => 'core\task\search_index_task',
|
2016-01-27 17:54:17 +08:00
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '*/30',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
2016-03-03 10:56:00 -05:00
|
|
|
array(
|
|
|
|
'classname' => 'core\task\search_optimize_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '15',
|
|
|
|
'hour' => '*/12',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
2014-02-25 09:47:39 +08:00
|
|
|
array(
|
|
|
|
'classname' => 'core\task\stats_cron_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '0',
|
2016-08-04 15:38:12 +08:00
|
|
|
'hour' => '0',
|
2014-02-25 09:47:39 +08:00
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\password_reset_cleanup_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '0',
|
|
|
|
'hour' => '*/6',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
2016-04-04 16:18:42 +08:00
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\complete_plans_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => 'R',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'classname' => 'core\task\sync_plans_from_template_cohorts_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => 'R',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
2017-02-17 09:34:55 +08:00
|
|
|
array(
|
|
|
|
'classname' => 'core_files\task\conversion_cleanup_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => 'R',
|
|
|
|
'hour' => '2',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
2017-03-05 14:28:33 +08:00
|
|
|
array(
|
|
|
|
'classname' => 'core\oauth2\refresh_system_tokens_task',
|
|
|
|
'blocking' => 0,
|
2017-03-30 11:45:46 +08:00
|
|
|
'minute' => '30',
|
2017-03-05 14:28:33 +08:00
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
2017-08-30 14:20:15 +02:00
|
|
|
array(
|
|
|
|
'classname' => 'core\task\analytics_cleanup_task',
|
|
|
|
'blocking' => 0,
|
2017-10-05 17:38:17 +02:00
|
|
|
'minute' => '42',
|
2017-08-30 14:20:15 +02:00
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
2018-12-04 10:39:56 +08:00
|
|
|
array(
|
|
|
|
'classname' => 'core\task\task_log_cleanup_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => 'R',
|
|
|
|
'hour' => 'R',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
2019-11-06 18:17:34 +00:00
|
|
|
array(
|
|
|
|
'classname' => 'core\task\h5p_get_content_types_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => 'R',
|
|
|
|
'hour' => 'R',
|
|
|
|
'day' => '1',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
2021-01-06 12:02:06 +02:00
|
|
|
array(
|
|
|
|
'classname' => 'core\task\h5p_clean_orphaned_records_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => 'R',
|
|
|
|
'hour' => '0',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
),
|
2020-03-15 20:09:48 +11:00
|
|
|
array(
|
|
|
|
'classname' => 'core\task\antivirus_cleanup_task',
|
|
|
|
'blocking' => 0,
|
2020-05-27 10:57:33 +10:00
|
|
|
'minute' => 'R',
|
2020-03-15 20:09:48 +11:00
|
|
|
'hour' => '0',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
2020-05-27 10:57:33 +10:00
|
|
|
'month' => '*',
|
2020-03-15 20:09:48 +11:00
|
|
|
),
|
2021-12-03 13:15:16 +00:00
|
|
|
array(
|
|
|
|
'classname' => 'core_reportbuilder\task\send_schedules',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '*',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'month' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
),
|
2022-03-11 09:50:45 +08:00
|
|
|
[
|
|
|
|
'classname' => 'core\task\task_lock_cleanup_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => 'R',
|
|
|
|
'hour' => '0',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
2023-01-18 13:06:34 +01:00
|
|
|
],
|
|
|
|
[
|
|
|
|
'classname' => 'core_xapi\task\state_cleanup_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => 'R',
|
|
|
|
'hour' => '0',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*'
|
|
|
|
],
|
2023-05-16 13:15:22 +02:00
|
|
|
[
|
|
|
|
'classname' => 'core\task\show_started_courses_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '00',
|
|
|
|
'hour' => '01',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*',
|
|
|
|
'disabled' => true,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'classname' => 'core\task\hide_ended_courses_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '00',
|
|
|
|
'hour' => '01',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
'month' => '*',
|
|
|
|
'disabled' => true,
|
|
|
|
],
|
2023-12-19 11:02:48 +11:00
|
|
|
[
|
|
|
|
'classname' => 'core_communication\task\synchronise_providers_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => 'R',
|
|
|
|
'hour' => 'R',
|
|
|
|
'day' => '*',
|
|
|
|
'dayofweek' => 'R',
|
|
|
|
'month' => '*',
|
|
|
|
],
|
2023-12-27 16:14:07 +07:00
|
|
|
[
|
|
|
|
'classname' => 'core\task\automated_backup_report_task',
|
|
|
|
'blocking' => 0,
|
|
|
|
'minute' => '*',
|
|
|
|
'hour' => '*',
|
|
|
|
'day' => '*',
|
|
|
|
'month' => '*',
|
|
|
|
'dayofweek' => '*',
|
|
|
|
],
|
2014-02-25 09:47:39 +08:00
|
|
|
);
|