Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cron output

Status
Not open for further replies.

vlz

IS-IT--Management
Aug 11, 2002
56
IL
Hi,
I get emails from my cron job.
They come from the user: daemon (From: daemon)
I'd like to have my original username in From field
as I have in HP-UX & Solaris.
Is it possible?
Thanks in advance
Vadim
 
For example I run this cron entry:
15 15 * * * print "message from cron"

I receive the cron output,i.e.
"message from cron" string as email from user: daemon

The question: is it possible to get this email from
my own user and not daemon?
 
hi ,

This behaviour is normal , becuase you are not specifying the user or mail command to send a mail , just a print it does not know who is sending the mail just a print statement so the cron daemon just sends a mail locally as daemon.

You can specify the mailx command

mailx -s "test message" username

username being the user you want to send the mail to
 
or `su - userid -c "print msg"` but the quoting can get messy. put msg in a ksh script, perhaps, and run that from cron.

IBM Certified -- AIX 4.3 Obfuscation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top