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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cron configuration ?

Status
Not open for further replies.

Janghyegyung

Technical User
Aug 20, 2001
42
KR
I got the standard error message by an e-mail that occured during the scheduling job on cron. Which file or anything like else, is related to this situation? When cron job is executed, if an error occurs, this error message is sent by mail.
 
What is your crontab??? put the line of the crontab that failed during the scheduling time...
 
You need to specify a location or device for the stdout and stderr, or else that output will be mailed to you. For example, if you want a program to send it's stdout to a logfile and its stderr to the console, do this:

mm hh DD MM ww /directory/myprogram > /directory/logs/my.log 2> /dev/console

Hope this helps, Einstein47
(Love is like PI - irrational, unending, and very important.)
 
Thank you. Helpful to me..

Well, if I do not specify stderr to console, all the stderr mailed? When it comes to other servers, I have not experienced the same thing whether I care or do not care about stderr..

And the other is that how to specify the special mail address? All the servers except one do not mail to xxx@xxx.com, which is my private address on other domain.

 
For mail :
command | mail user@host
For example :
echo Hello | mail root@host
 
compare your /etc/aliases file on the system that sends the email to you and a system that doesn't.

On the system that does, you will probably see your email address specified. On the system that doesn't, you won't see your email address. Change /etc/aliases to the way you want it (to receive or not receive) and then run the command newaliases to have the system reread the file.

Another file related to sending mail to another host is the /etc/hosts file. You need to specify the mailhost, which is your mailserver.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top