LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-03-2001, 02:20 PM   #1
_TK_
Member
 
Registered: Feb 2001
Posts: 54

Rep: Reputation: 15

I created a crontab to run a program every hour. Now whenever it executes, its send a mail message. I don't require the mail message. How can I shut that feature off??
 
Old 06-03-2001, 04:19 PM   #2
rshaw
Senior Member
 
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,692

Rep: Reputation: 45
change the mailto= line to MAILTO=/dev/null
 
Old 06-03-2001, 06:11 PM   #3
_TK_
Member
 
Registered: Feb 2001
Posts: 54

Original Poster
Rep: Reputation: 15
Wink

Thanks for the info
 
Old 06-04-2001, 11:04 AM   #4
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
You can also just redirect STDOUT and STDERR for the specific command you are using, something like
Code:
myCMD > /dev/null 2>&1
(I think). I assume that the MAILTO option is an overall setting in a config file somewhere yeah?

HTH

Jamie...
 
Old 06-04-2001, 11:11 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
I assume that the MAILTO option is an overall setting in a config file somewhere yeah?
Ure absolutely right. On my box its set in /etc/crontab & it wouldnt be kewl to disable that in the event of some -other- cronjob barfing up error messages, admin should know about it...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
crontab sending mail ryedunn Linux - Newbie 3 01-21-2005 06:47 PM
Stop trying sending mail dani81 Linux - Newbie 0 10-13-2004 06:17 AM
how to stop Logdrake mail alert kozaki Mandriva 6 07-21-2004 11:11 AM
is there a way to stop cronjobs mail for certain acticities manojthakkar Linux - General 5 12-08-2003 10:56 PM
Sending mail through crontab!! RKris Linux - Software 3 08-27-2002 03:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration