03.09.2018 Views

Moodle 2.0

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 3<br />

Backup<br />

You'll find the backup settings under Site Administration | Courses | Backups.<br />

Most of these settings enable you to choose the type of data that gets backed up. You<br />

can also choose which days of the week the backup will automatically run, and the<br />

hour the backup job will start. Usually, you want to choose a time when there are<br />

few users on the site. The backup is activated by the cron job routine.<br />

Seting up the Cron Job<br />

Some of <strong>Moodle</strong>'s functions occur on a regular, timed schedule. The most visible<br />

example is mailing out notices to the subscribers of a forum that a new message has<br />

been posted. A script called cron.php checks periodically to see if new messages<br />

have been posted to any forum. If so, the script causes the notice to be emailed to the<br />

members of that forum.<br />

The cron job also triggers routines that clean up old data and back up your courses.<br />

The script cron.php must be triggered at regular intervals. You can set this interval.<br />

The mechanism that triggers the script is called a cron job. Directions for setting up the<br />

cron job are in the <strong>Moodle</strong> installation guide, available from http://moodle.org/.<br />

Some web-hosting services allow you to set up cron jobs. If you're buying hosting<br />

services, look for a host that allows you to set a cron job to run every hour, or even<br />

every few minutes. Some hosting services allow you to run a cron job only once a<br />

day. This means that <strong>Moodle</strong> will perform those functions that depend on cron.php<br />

only once a day.<br />

If you've been given space on your school's or company's web server, speak to the<br />

system administrator about setting up the cron job. <strong>Moodle</strong>'s cron.php uses very<br />

little memory and few system resources. Most servers could run it every 15 minutes<br />

without affecting the server's performance.<br />

If you cannot set up the cron job on your host, then your only other option is to set<br />

up the cron job on a Windows machine that you control. The cron job will reach<br />

out over the Internet to your <strong>Moodle</strong> site, and activate the script cron.php. Again,<br />

directions for this are in the <strong>Moodle</strong> installation guide, available at http://moodle.<br />

org/ installation guide. However, if you choose this option, you must keep that<br />

Windows PC running all the time, and it must also be connected to the Internet at<br />

all times. If the Windows PC goes down or offline, then the <strong>Moodle</strong> functions that<br />

require periodic triggering will also go down.<br />

[ 119 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!