Interestingly, crontab was one of the most difficult aspects of moodle for me to deal with. Even though I came to moodle thinking I understood how to use crontab, and was using it for a couple of other scheduling tasks, it turned out that my system needed a complicated approach to executing the cron.php and I had to get my brother help me to write a special script to automate it. I hope you don't run into the same complications I did!
When I was first learning about crontab I found a number of web pages that did a pretty good job of explaining what crontab is. A lot depends on whether your web server (the place where you run moodle) is on a Macintosh or Windows or some unix/linux machine. Also important is what kind of access you have to the server settings. If you have administrative access then I think it's easier to make the cron.php run automatically. I have my moodle in a virtual domain
on a commercial web host where I do not have administrative access and I ended up having to install php in my own directory.
My moodle is running on FreeBSD (a dialect of unix) and these pages helped me:
Martin has a great introduction to running the cron.php automatically from both unix and windows at
Here's some information on cron for Macintosh.
I think it's really important to understand the environment your moodle is running in: the operating system (unix, linux, freebsd, what version of windows, what version of Mac OS) and the web server (might be something like apache, iis
, etc) and what kind of access/permisions you have on that server (are you an administrator with "root" access, a user with limited access).
On thing that can help a lot in understanding what environment you're working is a little php script that calls up a lot of this information. Attached is a little script I call "phpinfo.php" and if you will upload
it to your server, say to the admin directory, and then call it in your web browser, you can get a lot of this information. For example, after uploading this script to your admin directory use this URL