Cron with web hosting services: Difference between revisions
mNo edit summary |
Helen Foster (talk | contribs) m (Installing Moodle template) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{Installing Moodle}}{{Update}} | ||
Your web-based control panel may have a web page that allows you to set up a [[Cron]] service process. | Your web-based control panel may have a web page that allows you to set up a [[Cron]] service process. | ||
Line 23: | Line 23: | ||
If you don't have permissions to run the 'wget' command on the server, you can use this php command: | If you don't have permissions to run the 'wget' command on the server, you can use this php command: | ||
/usr/local/bin/php -q /real/path/to/script/admin/cron.php | /usr/local/bin/php -q /real/path/to/script/admin/cli/cron.php | ||
For example: | For example: | ||
/usr/local/bin/php -q /home/username/public_html/moodle/admin/cron.php | /usr/local/bin/php -q /home/username/public_html/moodle/admin/cli/cron.php | ||
If you don't know what is the real path of your Moodle folder you can use the PHP command realpath. | If you don't know what is the real path of your Moodle folder you can use the PHP command realpath. | ||
Line 37: | Line 37: | ||
curl --silent --compressed http://mydomain.com/moodle/admin/cron.php | curl --silent --compressed http://mydomain.com/moodle/admin/cron.php | ||
[[es:Cron con servicios de alojamiento web]] |
Latest revision as of 09:56, 28 April 2015
This page requires updating. Please do so and remove this template when finished.
Your web-based control panel may have a web page that allows you to set up a Cron service process.
CPanel cron service
If you are using CPanel, login then look for "Advanced" category towards the bottom of the page. Click on Cron Jobs -> Advanced (Unix style). Enter the following for the cron to run every 30 minutes.
Email address for output: emailaddress@mydomain.con Minute:*/30 Hour:* Day:* Month:* Weekday:* Command: wget -q -O /dev/null http://www.mydomain.com/moodle/admin/cron.php
Click Commit Changes. Check your email for the output.
Other systems cron service
For other systems, look for a button called "Cron jobs". In there you can put the same sort of Unix commands as listed below.
If you don't have permissions to run the 'wget' command on the server, you can use this php command:
/usr/local/bin/php -q /real/path/to/script/admin/cli/cron.php
For example:
/usr/local/bin/php -q /home/username/public_html/moodle/admin/cli/cron.php
If you don't know what is the real path of your Moodle folder you can use the PHP command realpath.
Another alternative, if you do not have permission to run the 'wget' command, may be to use a curl command.
For example:
curl --silent --compressed http://mydomain.com/moodle/admin/cron.php