Re: PHP in crontab job
| From: | Juhan Kundla | Date: | Sun, 13 Oct 2002 11:34:51 +0000 |
| Subject: | Re: PHP in crontab job | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-119779@lists.php.net to get a copy of this message | ||
Ühel ilusal päeval [11-10-2002 20:48] kirjutas Sharat Hegde:
> Hello John,
>
> Thanks for the help. I was able to solve this. Thanks Marek for your help
> too in giving the same solution.
>
> The problem was with the crontab command not having the full path to php.
> Silly that a command line on the shell script should work but crontab is
> unable to find the same path.
This is not silly, the cron simply does not have the environment
variables set. If you are using vixie cron, you can set the environment
within the crontab ie:
PATH=/bin:/usr/bin
MAILTO=me@somehost.domain
* * * * * man cron
Cheers,
Juhan