Re: PHP + Cron jobs
| From: | Per Jessen | Date: | Sat, 27 Sep 2008 10:37:05 +0000 |
| Subject: | Re: PHP + Cron jobs | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-281027@lists.php.net to get a copy of this message | ||
Waynn Lue wrote:
> This is something that I've noticed for awhile, but last post to this
> mailing list reminded me that someone probably already knows how to
> work
> around this! I have a cron job that looks something like
>
> 12 6 * * * php /home/foo/temp.php
>
> But even if temp.php doesn't output anything, I still get emails from
> the crontab that consist of
>
> "Content-type: text/html"
>
> I assume this is happening because it's interpreting as a web page or
> some such.
Somehow your /home/foo/temp.php isn't running with the correct PHP
interpreter.
> Is there a better way to set the crontab so I don't get that
> output?
You can always use MAILTO= to direct any output from a cronjob.
/Per Jessen, Zürich