cron issues

cron issues

de Gary Redmond -
Número de respuestas: 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
Promedio de valoraciones: -
En respuesta a Gary Redmond

Re: cron issues

de 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
En respuesta a Scott Elliott

Re: cron issues

de Gary Redmond -
no its my own server, how did i find the cron logs?
En respuesta a Gary Redmond

Re: cron issues

de 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
En respuesta a Scott Elliott

Re: cron issues

de 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?
En respuesta a Gary Redmond

Re: cron issues

de 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