Hi,
I was wondering what was the easiest way of running the cron.php maintenance script on a regular basis? The site is hosted by a hosting company. At present I just click the link in the Notifications area of the admin area.
Cheers,
Steve
If you're on a Cpanel host, you should be able to set up a cron job via the admin interface. If you have shell access, you can use crontab -e
Can you provide more information about your hosting setup?
Its a Linux hosting with 1and1.
Is there anymore info you need?
Does anyone know if you can run cron.php from CMD in windows and set it as a Scheduled Task? If so, can you let me know what I have to do?
Steve
create a command script (*.cmd) file; e.g. runcron.cmd
In this file, you put the command to run the cron script via php; e.g.
c:\php\php.exe -f c:\moodle\admin\cron.php
(If you have included the PHP folder in your system's path variable, then you only need:
php -f c:\moodle\admin\cron.php
)
Now create a scheduled task and Browse for the command file you just created and set up your scheduled task as required. I recommend that you create a separate account on your computer (not Admin) for running the script. You will need to provide a username/password to run the scheduled task.
Hope this helps
Thanks for the infomation.
That is OK if you have Moodle running on your own machine but I have it hosted and wondered if you could run the Cron.php with a script?
Hi Steve
Moodle's cron script can be executed remotely, so you can use John's instructions on your own PC if you have PHP installed. If not, you could try using wget - there is a version available for windows. See the Windows instructions in the Cron docs (http://docs.moodle.org/en/Cron#On_Windows_systems).
Ken
Thanks, that helps a lot.
Cheers,
Steve
Hi Jaime,
the reason for backup failure is usually some non standard block or module (for example dfwiki, feedback) or one fault sign in database.
When I used moodle 1.5 I had sometimes problems with Dialogue module because it did not save ' as \' or some other sign if somebody wrote John's or John´s or John`s
Database finds this sign to be end of that field and causes error. With moodle 1.6 and 1.7 I have no more had problems with these signs but some blocks and modules using different coding than UTF8 may cause some problems too.