Task Schedular

Task Schedular

by Ambrish Tiwari -
Number of replies: 2

Moodle (version 2.9) is designed with various tasks that run in the background at set times in order to perform cleanup and other duties. Many of these tasks are self-explanatory, however not all are. We are working to enable scheduled tasks in our environment and would like to come to an understanding of what each task does so we can acknowledge how it will affect us. Can anyone provide any detailed insight as to what each scheduled task does?


Average of ratings: -
In reply to Ambrish Tiwari

Re: Task Schedular

by Colin Fraser -
Picture of Documentation writers Picture of Testers

There is actually more than one aspect to your question, the first being an understanding of the cron job. Essentially, the cron is a file containing specific commands that runs at predetermined times, determined by you. You can set the cron to run nightly, weekly, monthly, or timed to go off hourly, or even every minute, in some cases. It works similarly to Windows' Task Scheduler, but is more adaptable and controllable, I suspect. You have likely worked this bit out for yourself, but then the second part, that is the default scheduled tasks, you haven't quite got to. 

You could read this Moodle Doc, which will give you an insight what tasks are run, and how to set it up, or you could look for the file in the code base, and see what it is supposed to do. That Doc will lead to further information about what Scheduled Tasks are activated. 

The Moodle Cron is directly related to the Unix Cron, and there are many features that are the same. For a better understanding of how the Unix Cron works, particularly in setting up the timings, have a look at this document