Richard Kurth <[EMAIL PROTECTED]> wrote:
>
> I have a php script that runs at root. I have php compiled as a cgi to
> do this.
> My question is what is the best way to run a crontab so that it does
> not send a message every time it runs. This script runs every 5 min
> and it can get pretty frustrating to get this email.
> The script runs only if there is another file present if the file is
> not there it shuts down. But I still get the email.
> I have it set this way right know and I only get an email if there is
> an error. Is there a better way to do it
>
> 5 * * * * /home/sites/home/auto/creatacct.php > /tmp/logdump.LOG
> 0 0 * * * /home/sites/home/auto/mail.php > /tmp/logdump.LOG
>
Like this:
5 * * * * /home/sites/home/auto/creatacct.php > /tmp/logdump.LOG 2>&1
0 0 * * * /home/sites/home/auto/mail.php > /tmp/logdump.LOG 2>&1
It makes stderr go to the same place stdout goes, which is to your log
file in this case.
Mark
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]