Re: php w/CRON
| From: | Siggy | Date: | Wed, 23 Jan 2002 07:23:12 +0000 |
| Subject: | Re: php w/CRON | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-81644@lists.php.net to get a copy of this message | ||
What error message gets sent to root as to why it doesn't execute?
You might need to do
*/10 * * * * /path/to/php /path/to/script.php
or just make the start of your script like
#!/path/to/php
like you do with bash scripts.
Siggy
"Robert Abbate" <accounts@ispconcepts.com> wrote in message
news:20020123063750.77518.qmail@pb1.pair.com...
> Can someone please explain why when I run php from the command line like
> this:
>
> [root@lion ]# php /home/mydirectory/myscript.php
>
> it will execute just fine, but if I place this within CRON, it will NOT
> execute!
>
>
> # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
> TERM=vt100
> */10 * * * * php /home/mydirectory/myscript.php
>
> How do you get this to work? I need to be able to run php scripts as ROOT,
> and have them do ROOT functions (adding users, etc...)
>
> Robert
>
>
>