Cron on 1and1 shared servers

From MoodleDocs

The following information is taken from the 1and1 FAQs and should be read in conjunction with the instructions for Cron_with_Unix_or_Linux:

The following pages explain very clearly how to do the basic tasks:

All the necessary know-how to set up your cron by editing the crontab is now available to you after following the above tutorial. All you now need is to work out exactly what to add to your crontab, now that you can find it and edit it. This is found on the moodle docs page above. Specifically:

  • /15 * * * * /usr/bin/php /path/to/moodle/admin/cli/cron.php

The /usr/bin/php path for to be the same as in the tutorial and moodle pages, so it is exactly as shown.

For the /path/to/moodle/admin/cli you need to type the path you found during the above tutorial, which should look something like /username/homepages/nn/.../htdocs/moodle/admin/cron.php. This is the bit you might have difficulty with if you have used a one-click installation. Where is your moodle? For me my moodle is right inside my htdocs as shown in the above path. If you have got to the command line, the command 'pwd' shows you the complete path to where you are now. This should help you work it out.

See also