Making Cron email the results

brandags

New member
Joined
Oct 11, 2005
Messages
3
Hello.

How do I make my cron job email me the output of the php script? (I just switched from CPanel and it seems there was an option for that, but there must be something in lynx, wget, or some unix command that will do this, no?)

Currently, I'm using:

10 5 * * * lynx -dump http://domain.com/script.php

(I used to have > dev/null on the end, but thought if I removed that I would get emails...nope).
It seems to be running (I think), but I would like to get email notices each day when it runs so I can see what was processed.
Anybody know how to do this (short of using the mail() command within my PHP script)?

Thanks.
 
Of course you could use the php mail() function.

Another way would be to set the cronf job to redirect the output of the command to a file, and then mail that file to the user.

Jeff
 
Thank you

True, that would work, too.

It turns out that it actually does email you the cron output by default to the main email address on your account. (I just wasn't checking that account) * oops *
 
Back
Top