two ways to stop crontab emails
1) crontab was sending emails that were not being checked - filling up mail spool
2) first fix was to update individual crontab by using " >/dev/null 2>&1 "
3) second fix was to edit /etc/crontab to change MAILTO from root to ""
4) commented out original entry in /etc/crontab in case mail from cron is desired.
5) in order for the crontab entry in /etc/crontab to be activated need to restart cron services.
used script to record the process:
------------------------------------------------
Script started on Thu 06 Oct 2016 11:32:54 PM PDT
------------------------------------------------
--> crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.6g0J3r installed on Sun Jul 3 23:36:55 2016)
# (Cronie version 4.2)
# MIN HOUR DAY MONTH DAYOFWEEK COMMAND
########################################
58 23 * * * /home/luser/bin/runallscrpt
59 23 * * * /home/luser/bin/runhdscrpt
########################################
# 5 6-20 * * * /home/luser/bin/get-map
# */2 7-10 * * * /home/luser/bin/get-map
# */2 14-18 * * * /home/luser/bin/get-map
------------------------------------------------
--> crontab -e
------------------------------------------------
--> crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.xBq48F installed on Thu Oct 6 23:33:40 2016)
# (Cronie version 4.2)
# MIN HOUR DAY MONTH DAYOFWEEK COMMAND
########################################
58 23 * * * /home/luser/bin/runallscrpt >/dev/null 2>&1
59 23 * * * /home/luser/bin/runhdscrpt >/dev/null 2>&1
########################################
# 5 6-20 * * * /home/luser/bin/get-map
# */2 7-10 * * * /home/luser/bin/get-map
# */2 14-18 * * * /home/luser/bin/get-map
------------------------------------------------
--> cat /etc/crontab
SHELL=/bin/sh
PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
MAILTO=root
#
# check scripts in cron.hourly, cron.daily, cron.weekly, and cron.monthly
#
-*/15 * * * * root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1
------------------------------------------------
--> sudo vi /etc/crontab
------------------------------------------------
--> cat /etc/crontab
SHELL=/bin/sh
PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
# MAILTO=root
MAILTO=""
#
# check scripts in cron.hourly, cron.daily, cron.weekly, and cron.monthly
#
-*/15 * * * * root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1
------------------------------------------------
--> exit
exit
Script done on Thu 06 Oct 2016 11:34:45 PM PDT
|