1834154 Members
2625 Online
110064 Solutions
New Discussion

cron mailings

 
SOLVED
Go to solution
Mark Vollmers
Esteemed Contributor

cron mailings

I have a cron job that I have just setup to run daily (it was weekly). it runs as root and goes through and deletes some temp files from a number of specified directories. I do not need to see the output as it is run, and now that it is moving to a daily operation, it could fill up the root mailbox. Is there a way to configure the cron job to not mail for that operation while still mail outputs for the other jobs that are setup (backup, etc)? Thanks.
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
2 REPLIES 2
Paula J Frazer-Campbell
Honored Contributor
Solution

Re: cron mailings

Hi

Use this format :-

15 06-21 * * * /avro/DATA/BBS3A.FILE/sendout_lates > /dev/null 2>&1

And it will stop mailing you.


HTH

Paula
If you can spell SysAdmin then you is one - anon
Victor BERRIDGE
Honored Contributor

Re: cron mailings

Hi Mark,
As Paula suggested you can send the output to /dev/null, what you want, or to a file(if our are still a bit paranoid and want to double check...):
10 17 * 6,7,8 1,5 yourjob>>outfile 2>&1
#The 2>&1 redirects any error msg to the file outfile.

Best regards
Victor