Backup create empty entry (filename=".") in mdl_files table

Re: Backup create empty entry (filename=".") in mdl_files table

by Ken Task -
Number of replies: 0
Picture of Particularly helpful Moodlers

The .'s I think are related to operating system ... like ./ means present working directory and ../ means up one level.

You've shown how often your cron job runs ... once every minute good and is
the recommended setting.
But it's running as user vagrant.  Heard it's best to run it as the user under which
the web service runs (www-data/apache/apache2).
How about scheduled task in that cron job.
Task don't run once every minute but have a schedule of their own.

/admin/tool/task/scheduledtasks.php

Clean backup tables and logs \core\task\backup_cleanup_task
Cleanup files in trash \core\task\file_trash_cleanup_task
Cleanup category recycle bin \tool_recyclebin\task\cleanup_category_bin
Cleanup course recycle bin \tool_recyclebin\task\cleanup_course_bin
Delete stale temp files \core\task\file_temp_cleanup_task
Cleanup files in trash \core\task\file_trash_cleanup_task

There's a 'run now' button under any of those to test individually outside of the overall cron run?

BTW, what's shown above can also be run via command line:

/admin/tool/task/cli/schedule_task.php with the task to run ...

I have a little bash shell script in that directory that I can run:

./docleanup

executes the following one at a time.

php schedule_task.php --execute="\core\task\session_cleanup_task"
php schedule_task.php --execute="\core\task\file_temp_cleanup_task"
php schedule_task.php --execute="\core\task\file_trash_cleanup_task"
php schedule_task.php --execute="\tool_recyclebin\task\cleanup_category_bin"
php schedule_task.php --execute="\tool_recyclebin\task\cleanup_course_bin"
php schedule_task.php --execute="\core\task\cache_cleanup_task"
php schedule_task.php --execute="\core\task\cache_cron_task"
php schedule_task.php --execute=\\core\\task\\cache_cron_task

'SoS', Ken