You are not logged in.
I added the following to /etc/conf.d/crond per the man page which stopped most of the mails:
CRONDARGS=-m /dev/null
I still get mails for jobs in /etc/cron.hourly/ so I added the following to /etc/cron.d/0hourly
MAILTO=
Is there a better or more global setting to accomplish this?
EDIT: Solved by switching back to crond and see post #4
Last edited by graysky (2011-10-16 15:36:53)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
You shouldn't need to do this. What's in the emails?
Consider "> /dev/null" in your cron-run scripts, so they don't output stuff you don't want to see, and hence trigger cron to email it to you in the first place.
Offline
Not sure if it helps but
http://mailman.archlinux.org/pipermail/ … 19661.html
Scripts in '/etc/cron.hourly' are run directly by `/usr/sbin/crond` while scripts in '/etc/cron.daily', '/etc/cron.weekly', and '/etc/cron.monthly' are run by indirectly by `/usr/sbin/crond` through `/usr/sbin/anacron`.
[karol@black ~]$ cat /etc/anacrontab
# /etc/anacrontab: configuration file for anacron
# See anacron(8) and anacrontab(5) for details.
SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
# the maximal random delay added to the base delay of the jobs
RANDOM_DELAY=45
# the jobs will be started during the following hours only
START_HOURS_RANGE=3-22
#period in days delay in minutes job-identifier command
1 5 cron.daily nice run-parts /etc/cron.daily
7 25 cron.weekly nice run-parts /etc/cron.weekly
@monthly 45 cron.monthly nice run-parts /etc/cron.monthly
As you can see, anacron does run daily, weekly and monthly jobs, but not hourly.
Can you post some of the e-mails you want to get rid of? Maybe they are error-related - do you have /etc/cron.hourly/ directory at all?
Offline
@karol - I have nothing in my /etc/cron.hourly/
The offending script was in root's crontab. I have since appended the following to it which fixed the mails: > /dev/null 2>&1
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline