Gossamer Forum
Home : General : Internet Technologies :

Stop cron jobs sending email?

Quote Reply
Stop cron jobs sending email?
I've just been looking at my server...and I see that every time a CronJob is run, it sends an email to /var/spool/mail/user. Is there a way to stop this? The file size of the mainbox was not huge, but I can imagine it will get larger as I put more cron jobs on.

Has anyone worked a way around this, or am I just wishful thinking?

Thanks

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy.] Stop cron jobs sending email? In reply to
It normally spews out an email when cron encounters an error.

You should consider alising root email so it goes to one of your email accounts or at least read your root emails ;0)

Last edited by:

Paul: May 15, 2002, 6:38 AM
Quote Reply
Re: [Andy.] Stop cron jobs sending email? In reply to
Send the output of the command to /dev/null.

Example of one crontab on my system:

Code:
# 5,15,25,35,45,55 * * * * /usr/local/bin/fetchmail -v >> /dev/null 2>&1

- wil

Last edited by:

Wil: May 15, 2002, 6:40 AM
Quote Reply
Re: [Paul] Stop cron jobs sending email? In reply to
Ah..your correct Paul. I've just deleted all the emails, but upon looking at a couple of them they are all just error messages saying it wasn't run.

Wil...I'll keep that in mind...could come in handy...lol

Thanks Smile

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy.] Stop cron jobs sending email? In reply to
/dev/null is your friend.
/dev/caffeine is your saviour

;-)

- wil
Quote Reply
Re: [Andy.] Stop cron jobs sending email? In reply to
And incase you don't know, /dev/null is like your windows recycle bin.
Quote Reply
Re: [Paul] Stop cron jobs sending email? In reply to
Huh? /dev/null is not like your Recycling Bin. When things go to /dev/null they don't come back! :-)

- wil
Quote Reply
Re: [Wil] Stop cron jobs sending email? In reply to
I was using the term loosely to give andy an idea of what it did.
Quote Reply
Re: [Paul] Stop cron jobs sending email? In reply to
OK. It's just a bit misleading, that's all. I'd hate for him to mv /etc/*.* /dev/null thinking he could reclaim it at a later date ;-)

- wil
Quote Reply
Re: [Wil] Stop cron jobs sending email? In reply to
Sheesh.....

"And incase you don't know, /dev/null is like doing a shift + delete in windows."
Quote Reply
Re: [Paul] Stop cron jobs sending email? In reply to
LOl..thanks guys...I assumed it was something like that Wink

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!