Setup+the+cron+Maintenance+Script

=Setup the cron Maintenance Script (Unix)=

There are different command line programs you can use to call the page from the command line. Not all of them may be available on a given server. If you have a command line, you can set up [|cron] yourself using the command: code crontab -e code and then adding one of the above commands like: code code
 * /5 * * * * wget -q -O /dev/null http://example.com/moodle/admin/cron.php

Usually, the "crontab" command will put you into the //vi// editor, not //pico//. However, if you do go into //pico// then disregard these next steps. You enter "insert mode" by pressing "i", then type in the line as above, then exit insert mode by pressing ESC. You save and exit by typing ":wq", or quit without saving using ":q!" (without the quotes). The cron command I entered looked like this: code code Note that */5 means this script will run every 5 minutes. code MAILTO=admin@example.com 0 */6 * * * wget -O - http://example.com/moodle/admin/cron.php code Would run every 6 hours, on the hour, and mail the output (just in case there are problems) to the administrator.
 * /5 * * * * wget -q -O /dev/null http://172.17.254.1/moodle/admin/cron.php