Cron jobs in moodle

Cron jobs in moodle

by Ripa Desai -
Number of replies: 2
hello,

I read about cron jobs many times. However, I don't know exact concept behind that.

What is cron jobs in moodle?
What is the purpose behind that?
How could we see setup of cron jobs in moodle?

Would you please elaborate me..? Please do not attach any link.... I tried to understand that documentation and it is tough to understand..

Thanks


Average of ratings: -
In reply to Ripa Desai

Re: Cron jobs in moodle

by Bret Miller -
Picture of Particularly helpful Moodlers

Moodle has things it must do internally to keep itself "clean" and "tuned". The cron process is what takes care of these things for it. For your own servers, you'd use crontab -e on linux to add a job that calls the cron process every minute. You can do it less often, but every minute means things are done more timely and the overhead of doing that is very small. Essentially  you add a line like this:

* * * * * php path-to-moodle/admin/cli/cron.php

On Windows server, you can do it similarly with Task Scheduler.

On shared hosting, your provider may give you access to cron/scheduling through their control panel, or if you have ssh access, use the linux crontab.


Average of ratings: Useful (1)