touch should only work on temp and below
dir's. With path we get temp/.. and temp/.
So we were modfying moodledata dir as well
and it was failing because of permission issues.
This scheduled task was previously only doing a partial delete
due to the fact that the directory modification time would be
updated when a child file was deleted. It would then have to
wait another week before that directory could be deleted.
Remove errors when attempting to delete non-empty directories when
child directories do not get removed since the mtime was updated when
files were removed from the child directory.
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.