[Toolserver-l] Job scheduling and mail receiving

Ilmari Karonen nospam at vyznev.net
Wed Feb 9 13:48:24 UTC 2011


On 02/09/2011 03:22 AM, River Tarnell wrote:
>
> Or, if you only wanted to receive output on failure:
>
> 	#! /bin/ksh
> 	f=$(mktemp)
> 	trap "rm -f $f" 0
> 	/path/to/mytool>$f 2>&1 ||<$f mailx -s "Tool output" $LOGNAME

Just out of curiosity... is there a particular reason for the -f switch 
to rm here, or are you just trying to be extra sure the tempfile gets 
deleted?

> I think you're the first person who's asked about this, but it seems
> like a useful feature, so I'll see if there's a way to make it easier.

I remember being disappointed by the lack of stderr output in the mail I 
got after switching my Commons MIME type statistics script over to SGE, 
but then I just thought "meh, I'm logging to a file anyway, I can always 
just look there if something goes wrong."

-- 
Ilmari Karonen



More information about the Toolserver-l mailing list