Commit Graph

27 Commits

Author SHA1 Message Date
Huong Nguyen bd3af64741 MDL-79128 adhoc_task: Added 'Never' status for ad-hoc task Next run
Co-authored-by: Stevani Andolo <stevani.andolo@moodle.com>
2023-12-20 13:55:13 +07:00
Paul Holden 608bddeb3d MDL-79839 tool_task: clean task classname parameter prior to use. 2023-12-07 10:53:39 +08:00
Paul Holden 96fc3577f4 MDL-79975 tool_task: correct class attribute table cell property. 2023-11-02 13:15:05 +00:00
Srdjan 85323070e7 MDL-70975 task: adhoctasks.php - queued ad hoc tasks report
Similar to scheduled tasks report

core\task\manager::adhoc_task_from_record() now raises moodle_exception
2023-04-05 11:29:46 +10:00
Paul Holden 91ae2c25b4 MDL-75308 task: explicit check for tasks of disabled plugins.
The enabled state of a plugin is a tri-state value (boolean or
null). We should be consistent with elsewhere by only considering
boolean false as an actually disabled plugin.

See also cdcb53a1 for similar change in task management.
2022-08-30 13:04:06 +01:00
Jordi Pujol Ahulló 9c4510a358 MDL-70230 admin: add setting sched. task status
When defining settings that are used by scheduled tasks,
it is also useful, or even needed, to know the status
of that scheduled task to have the whole big picture of
that part of the system.

Based on the admin_setting_description, this new setting
reports its name, its status, a link to the configuration.

When adding a new setting of this type, the user can add
an extra description field to complete the whole meaning.
2021-06-04 08:12:16 +02:00
Brendan Heywood 75d5debe54 MDL-68010 tool_task: Allow disable tasks to still be run manually 2020-12-15 16:59:47 +11:00
Jamie Stamp 3a232840a5 MDL-65843 tasks: Allow schedules to be overridden in config 2020-11-18 12:44:05 +00:00
Mikhail Golenkov d7342dc239 MDL-67211 Tasks: Add cron_enabled setting.
Co-authored-by: Sam Marshall <s.marshall@open.ac.uk>
2020-08-25 17:08:57 +10:00
David Mudrák cdcb53a114 MDL-69099 tasks: Do not mark the non-enabled plugin's task as disabled
The `core\plugininfo\base::is_enabled()` uses three-state logic for its
return value. It can return null as a valid value as per its
documentation. We need to test for the explicit false value in this
case.

To make the attached Behat test able to identify the table, the caption
is added. It seems to be helpful for all users so I leave it displayed
without using the accesshide mechanism.
2020-06-22 17:23:10 +01:00
cescobedo db15746c2d MDL-63580 core_task: Deprecation cron_run_single_task and run_from_cli
Also we have move the functions in \tool_task\run_from_cli to \core\task\manager
and we have deprecated that class.
2020-05-11 10:53:23 +02:00
Eloy Lafuente (stronk7) 2ede5371ed Merge branch 'MDL-67895' of https://github.com/timhunt/moodle 2020-04-08 00:01:33 +02:00
Tim Hunt 9205d263d6 MDL-68256 task admin UI: Grrrr! browsers 2020-04-07 19:04:53 +02:00
Tim Hunt 9bf4d19930 MDL-67895 task admin: show defaults when editing a task
Also show the task classname, and the component info above the form.

With some refactoring to eliminate duplicated logic.
2020-03-28 18:40:51 +00:00
Tim Hunt 6fdc0f8796 MDL-68256 task admin: usability improvements
In the table that lists the scheduled tasks:

1. There are badges to show which components are disabled.
2. The plugin name (e.g. auth_ldap) is shown as well as the
   human-readable name (e.g. LDAP server).
3. Where a time column has a non-default value, it is highlighted
   and the default is shown.
4. If the fail-delay is non-zero, the cell is highlighted.
4. If you just interacted with a task (looked at or edited the settings,
   did Run now, or cleared the fail delay) that row is highlighted,
   and scrolled into view when the page loads.

To support this, some of the methods for loading the default tasks
have been extended with an optional argument to leave 'R' as 'R'
rather than replacing with a random number.

Also, mixed into this commit are a bunch of coding style improvements.
Sorry I did not separate them out, but ultimately this makes the
Moodle code better.
2020-03-28 18:40:51 +00:00
Andrew Nicols 251ee97c35 MDL-49399 tool_task: Link to log viewer
This commit also adds the fa-file-text icon from font-awesome.
2019-01-16 12:14:25 +08:00
Toni Barberà Melià c759ae5d55 MDL-60514 tasks: added new config parameter. changes in cron execution 2018-10-25 08:02:44 +02:00
sam marshall 470d59d31f MDL-61063 Scheduled tasks: Add link to clear fail delay 2018-01-12 11:10:29 +00:00
sam marshall 38fa1ca558 MDL-55980 Scheduled tasks: Run individual scheduled tasks from web 2017-02-24 10:42:28 +00:00
Frederic Massart 113efed5b0 MDL-51948 admin: Make admin settings RTL friendly
Part of MDL-55071
2016-09-23 10:54:22 +01:00
Frederic Massart 18247eb090 MDL-48383 task: Indicate when a task will not run if plugin is disabled 2015-01-22 11:07:52 +08:00
Andrew Nicols f12f34166d MDL-45329 admin_task: Allow scheduled task change prevention
Some hosting providers have a requirement to prevent users making
modifications to the configuration of scheduled tasks as doing so may have
a negative impact not only on their own site, but also on the performance
of other sites (depending on host configuration). For example, if the
statistics or automated backup tasks were run every minute, this could have
a negative impact for other users).
2014-05-01 11:40:25 +08:00
Petr Škoda 246230715e MDL-44733 add disabled class rows with disabled scheduled tasks 2014-03-31 15:48:19 +08:00
Petr Škoda 0a5aa65b53 MDL-44733 add support for disabling of scheduled tasks 2014-03-28 10:23:37 +08:00
Petr Škoda 5a1e6e355f MDL-44639 fix phpdocs in scheduled tasks tool 2014-03-20 17:32:56 +08:00
Petr Škoda b2ad781349 MDL-44609 add component column to the scheduled task table 2014-03-14 15:48:25 +08:00
Damyon Wiese 309ae8921f MDL-25499: Centralise management of all types of cron tasks
Centralise management of all types of cron tasks with registration, scheduling,
parallel task conflicts(blocking) and running once off tasks, all using an
administration screen.

This is a combination of several issues:

MDL-25502: Added "black magic" task allocator for cron
MDL-25503: Add step to cron to run all scheduled tasks
MDL-25504 cron: Refactor to use scheduler
MDL-25505: Add an admin interface to schedule tasks via cron.
MDL-25507: Add support for adhoc tasks.
2014-02-26 12:03:46 +08:00