That is a good principle I have already applied.
Also:
I usually mail the local user and, for the sake of redundancy,
timestamp the time an error occured before exiting the script.
I also duplicate the message to the shell after the local user gets
the mail, because I figure the user's locus of attention may not make
them aware to check their mail. Which is especially important, since
I will not be the only user of the script.
so,
set err_timestamp = `date`
echo "Script $0 aborted at $err_timestamp. (Stuff about error here.)"
| mail $user
echo "The following message has been forwarded to your user mailbox:"
echo "Script $0 aborted at $err_timestamp. (Stuff about error here.)"
On 6/27/06, Kris Knutson <[log in to unmask]> wrote:
> It is quite handy to send yourself an email when your batch job is done.
>
> Add something like the following to the end of your batch file
> sendmail [log in to unmask] <$path/completion_msg
>
> I used a tcl program where the command was:
> exec rmail [log in to unmask] <$bin/compmsg
>
|