Anton Graham <[EMAIL PROTECTED]> wrote:
> Submitted 12-Dec-00 by Chris Spencer:
> 
> > This really sucks because at the moment I have a fetchmail 
> > job running every five minutes to get my mail from the local ISP mail server.
> 
> Why not run fetchmail as a daemon instead of from a cron job?

Great suggestion.  (Note that I'm not Chris ;-)

> > How can I stop cron from sending email? Thanks...
> 
> Redirect all output from the job to /dev/null and cron won't have anything
> to mail.  cron assumes that any output from the job is important and mails
> it.

If the email cron sends may ever be important to look at, you may
wish to instead send the output to a file, which you can then treat
as a log file - that is, 'rotate' old versions off into the ether,
as it were.

In your crontab, say something like this:

50 16 * * 1-5 /run/ThisThing >> /where/my/log/files/go/ThisThing.log 2>&1

NOTE the 2>&1 - this is run under 'sh', and if anything leaks out of
'runThisThing' on stderr then you'll get email also!

(obviously, if you don't CARE about the output, ever, then change that to:

50 16 * * 1-5 /run/ThisThing > /dev/null 2>&1

rc


Keep in touch with http://mandrakeforum.com: 
Subscribe the "[EMAIL PROTECTED]" mailing list.

Reply via email to