-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 In article <4d516a08.5050...@surfeu.ch>, Dr. Trigon <dr.tri...@surfeu.ch> wrote: > Just a short question in [1] is mentioned how to trigger a mail in case > > * the job starts > * the job finishes > > what about > > * the job print something to stdout like for CRON jobs (in the early > days... ;))
I don't think there's a built-in method of doing this. You could use a wrapper script that did something like: #! /bin/ksh /path/to/mytool 2>&1 | mailx -s "Tool output" $LOGNAME 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 Or only if the command generated output: #! /bin/ksh f=$(mktemp) trap "rm -f $f" 0 /path/to/mytool >$f 2>&1 test -s $f && <$f mailx -s "Tool output" $LOGNAME ... etc. 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. - river. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk1R7FIACgkQIXd7fCuc5vKEPgCdEJj19ST9Kmz1jknYCtFSo09x iH0AnRMSq1OPN4N+20/8MtsaxmjgO8Ac =3lS2 -----END PGP SIGNATURE----- _______________________________________________ Toolserver-l mailing list (Toolserver-l@lists.wikimedia.org) https://lists.wikimedia.org/mailman/listinfo/toolserver-l Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette