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.
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>
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>
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.
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.