Welcome, Guest
Please Login or Register.
Lost Password?
Scheduled Cron Job - How to disable email to root (1 viewing)
Post Reply

TOPIC: Scheduled Cron Job - How to disable email to root

#7412
ah...lifes...good (User)
Posts: 260
graphgraph
Scheduled Cron Job - How to disable email to root 2007/09/17 22:57  
> Webmin > System > Scheduled Cron Jobs

I noticed that whenever a cron job is run, an email gets sent to the server root's email address.

It is annoying because it is taking up unnecessary server space in the email folder and bogging me down whenever I want to check the LogWatch email.

So I asked our Webmin genius what can we do to stop the automatic email to root. Below is his answer.

I have used Jamie's suggested Option 1 - simply insert >/dev/null 2>&1 at the end of the command (with a space in between of course). It works like a charm. Thanks Jamie!



Jamie:

1) Change the command to put >/dev/null 2>&1 at the end, which causes all output to be thrown away.

2) In the Cron module, add an environment variable named MAILTO whose value is some other address that you want email sent to. This can be left empty to have the email sent nowhere.
Just make sure you put this MAILTO variable before the Cron entry for the command whose output you don't want. This can be done using the up and down arrows in the list.
  The administrator has disabled public write access.
Post Reply
get the latest posts directly to your desktop

Talk and Get Help

Support
Forums
Bugs and Issues

Get Virtualmin

OS Support
Buy Online
Download
Copyright 2005-2007 Virtualmin, Inc. All rights reserved.