Cron Job


#1

Hi,
anybory can help with that code below for cron job?

/usr/local/php5/bin/php /home/folder/domain.com.br/index.php?code=teste

We tried that, but no success.

Thanks


#2

What specifically is the error? What’s the entire entry line in your crontab?

Unless your script was designed to run from the command line, it’s probably croaking because it won’t have any of the normal $_SERVER and the like that it’s expecting. If you want to trigger something by automatically requesting a page every so often, use wget or curl in your cronjob


#3

Hi bobocat, we found the problem. We need pass variable along the link, so we can’t use /usr/local/php5/bin/php and have to use /usr/bin/curl with the full url with variables.

At this moment we still testing, but seems to work now.

thanks