Dave Korn wrote:
On 15 March 2007 22:10, Matthew Woehlke wrote:

Pierre A. Humblet wrote:
It's working because we know it's trying to mail you something.
To find out what,  remove MAILTO="" and install a poor man's mailer as
follows. It will write the mail output to /cronmail.txt

~: cd /
/: cat > cronmail.sh
cat > /cronmail.txt
(NOTE: type CTRL-C after typing the above line)

  Ctrl+D is a better way to close the file actually.  If you mean EOF, why not
*say* EOF? :-)

...because CTRL-D doesn't work on all platforms, and I was too lazy to check if it did on Cygwin. :-)

...and shouldn't that be 'cat >> ...' instead of 'cat > ...'?

  Well, the difference would be whether you (or in this case, Kevin) want(s)
all the 'mails' to get appended to an ever-growing cronmail.txt, or want each
new 'mail' to overwrite the previous one.  For cron jobs, you often do only
care about the results from the most recent run.

  Think of it as a very simple form of logfile rotation!

I was thinking if there was more than one job, you never see the logs from one of them. :-) So I guess the right answer to this is situational.

--
Matthew
"Have you tried that new mixed drink, 'GDR'"?
"What is it?"
"Gin, Duck and Rum. It tastes fowl."


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to