From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078694111241.tru64-unix-managers.marc@archive.invalid> From: Alex_Nord () Jabil ! com Date: Tue, 10 Feb 1998 18:30:27 +0000 To: tru64-unix-managers Subject: [SUMMARY] Subject field in mail from cron jobs X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078694111241 Most people suggested the same thing : use mailx (or Mail) with the -s option to include a subject, but Bill David provided the complete syntax (to re-direct stdout as well as stderr from the crontab file) similar to : 5 2 * * * /usr/local/bin/nightly.backup 2>&1 | /usr/bin/Mail -s "Nightly Backup Output" Alex_Nord@jabil.com What I was specifically searching for was a way to modify cron's beavior when sending mail, but a few people indicated they didn't think it was possible. So, it looks like I'll go with this as the next best thing! Thanks everybody! > -----Original Message----- > From: Alex_Nord@Jabil.com [SMTP:Alex_Nord@Jabil.com] > Sent: Tuesday, February 10, 1998 12:00 PM > To: alpha-osf-managers@ornl.gov > Subject: [Q:] Subject field in mail from cron jobs > > Is there a way to set the subject field in mail messages that > are sent as the result of cron jobs? I have tried adding something > like > the following : > echo "Subject: Nightly Backup Output" > as the first line in the script (which works on some other versions of > Unix), but it just ends up as the first line of the body of the > message. > Any insight on how to get this to work properly? I am running DU 4.0 > with no major patches. > > Alex Nord > UNIX Systems Admin. > Jabil Circuit, Inc. > alex_nord@jabil.com