24 Commits

Author SHA1 Message Date
Brendan Heywood
327d1ced40 MDL-77530 tool_task: Fix coding errors in longrunningtasks check 2023-03-10 11:28:45 +08:00
Brendan Heywood
653ad78f43 MDL-77530 tool_task: Fix coding errors in checks 2023-03-10 11:28:45 +08:00
Meirza
e2d5d50276 MDL-77336 admin: Added class properties that are not declared.
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-03-06 16:44:06 +07:00
Sara Arjona
0b733266b0 Merge branch 'MDL-72775-master' of https://github.com/QihuiChan/moodle 2022-12-27 16:12:50 +01:00
Qihui Chan
791e56d3bc MDL-72775 tool_task: check long running tasks 2022-12-23 09:41:05 +10:00
Daniel Ziegenberg
e2d788f617
MDL-63594 core: Final deprecation of CLI script from admin/tool/task/cli
Following MDL-63580 this now finally deprecates and removes the class
\tool_task\run_from_cli, please use \core\task\manager.

Following MDL-63580 this now finally deprecates and removes
 - admin/tool/task/cli/schedule_task.php, use admin/cli/scheduled_task.php
 - admin/tool/task/cli/adhoc_task.php, use admin/cli/adhoc_task.php

Also mentions and references to the old CLI scripts are updated to
point to the new counterparts.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2022-06-08 10:55:30 +02:00
Daniel Ziegenberg
a4d64bd71b
MDL-73923 tool_task: make a more relaxed check on cron run interval
Prior to this change, the tool_task_cronrunning check had very tight
limits for checking the last cron interval and comparing it to the
expected frequency. When a cron job should take 1:00 min and the last
run was 1:02 min it complained that there was 1:02 between the last two
runs of the cron maintenance script and it should run every 1:00.

This change makes the check a bit more relaxed and adds an additional
minute on top of the expectedfrequency to give the cron job some time.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2022-03-03 14:27:32 +01:00
Jordi Pujol Ahulló
21f73b29c1 MDL-69764 tool_task: unify crontab verification
Use scheduled_task crontab field verification in
admin/tool/task to unify how Moodle deals with
crontab definition and its verification.
This helps remove duplicated code and fix
crontab definition not allowed in the web form,
but actually was valid.

Updated crontab fields precision on task_scheduled
table to have enough room for the worst case:
all possible different values separated by comma.
2022-02-17 13:24:31 +01:00
Paul Holden
d12eb4943b MDL-72467 tool_task: improve cron status check details. 2021-09-02 17:32:19 +01:00
Brendan Heywood
71f180447a MDL-68768 tool_tasks: Check for failing adhoc tasks 2020-12-15 12:49:00 +11:00
Eloy Lafuente (stronk7)
432b9a9075 MDL-69521 core: Move all comments in code from 4.3 to 4.1 2020-09-08 18:59:46 +02:00
Mikhail Golenkov
45875f6f7b MDL-67211 Tasks: Front-end to display currently running tasks.
Co-authored-by: Sam Marshall <s.marshall@open.ac.uk>
2020-08-25 17:08:47 +10:00
Mathew May
329d3a8de5 MDL-68946 tool_task: Make clionly string handling more consistent 2020-06-08 17:11:57 +08: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
Andrew Nicols
aae4b15631 Merge branch 'MDL-47271-status-api-fixes' of https://github.com/brendanheywood/moodle 2020-04-08 12:37:52 +08:00
Brendan Heywood
59a44a5bad MDL-47271 tool_task: Added Task API status checks 2020-04-08 14:35:33 +10: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
Toni Barberà Melià
c759ae5d55 MDL-60514 tasks: added new config parameter. changes in cron execution 2018-10-25 08:02:44 +02:00
Zig Tan
de33cd0cab MDL-61892 admin/tools: Implement null privacy providers 2018-04-20 11:41:20 +08:00
Ruslan Kabalin
d1bb9ea917 MDL-48841 admin: Fix scheduled task reset to defaults finctionality.
It is safe to make fields as non-required, because form validation will not
pass through any empty field anyway.
2015-02-11 11:19:27 +00: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
Ankit Agarwal
c241edb5cf MDL-44393 tasks: Validate cron fields 2015-01-02 10:54:59 +05:30
Petr Škoda
0a5aa65b53 MDL-44733 add support for disabling of scheduled tasks 2014-03-28 10:23:37 +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