cron issues

cron issues

by Gary Redmond -
Number of replies: 5
I am using curl and have tried various other methods to get cron to run but it won't work, when I run the cron script in the browser it's fine and fine when i run the command from the command line but from the crontab it just dosen't work
Average of ratings: -
In reply to Gary Redmond

Re: cron issues

by Scott Elliott -
Gary,

Are you using a hosting company?

This may be related to http://moodle.org/mod/forum/discuss.php?d=48944.

What is your crontab entry?  Are there any errors in the cron logs?  PHP logs?

Scott
In reply to Scott Elliott

Re: cron issues

by Gary Redmond -
no its my own server, how did i find the cron logs?
In reply to Gary Redmond

Re: cron issues

by Scott Elliott -
This depends on your cron configuration settings, but you might try /var/log/ first.

Before you check the logs, let's see your crontab entry.

If you're not familiar with cron, you may want to checkout docs.moodle.org for installation questions.

Scott
In reply to Scott Elliott

Re: cron issues

by Gary Redmond -
*/5 * * * * curl -q -s -o /dev/null http://127.0.0.1/moodle/admin/cron.php

that should be alright shouldn't it?
In reply to Gary Redmond

Re: cron issues

by Scott Elliott -
Gary,

Looks OK, try using the full path to curl. 

You may also consider using a php instead of curl.  Something like: 

*/5 * * * * /usr/bin/php -f /home/user/public_html/admin/cron.php

Of course replace /home/user/public_html/ with your path to admin/cron.php

Scott