Hi I have default crontab (SuSE 7.2), and I have added an entry for every minute. Now cron is sending mail for that entry (ie. evey minute) to root. How can I prevent this? Jaska. Here is the 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 # 1 * * * * root /etc/cron.minute/test_tunnel <--- this is added -*/15 * * * * root test -x /usr/lib/cron/run-crons && ...<cut> 59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly 14 0 * * * root rm -f /var/spool/cron/lastrun/cron.daily 29 0 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly 44 0 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly
Jaakko Tamminen wrote:
Now cron is sending mail for that entry (ie. evey minute) to root.
How can I prevent this? [...] Here is the 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 # 1 * * * * root /etc/cron.minute/test_tunnel <--- this is added
Do the following: 1 * * * * root /etc/cron.minute/test_tunnel >/dev/null Then you'll only get an email if there's an error. If you do not want to get any email add an 2>/dev/null after the above line. Rene
What happens if the MAILTO is made empty (MAILTO="") Op donderdag 20 december 2001 11:26, schreef Jaakko Tamminen:
Hi
I have default crontab (SuSE 7.2), and I have added an entry for every minute.
Now cron is sending mail for that entry (ie. evey minute) to root.
How can I prevent this?
Jaska.
Here is the 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 # 1 * * * * root /etc/cron.minute/test_tunnel <--- this is added -*/15 * * * * root test -x /usr/lib/cron/run-crons && ...<cut> 59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly 14 0 * * * root rm -f /var/spool/cron/lastrun/cron.daily 29 0 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly 44 0 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly
-- Richard Bos For those without home the journey is endless
Hi Setting the e-mail does not help, I tried that one too :-( How I managed to get it not to send any e-mail was that I pipe the command with: * * * * * root /etc/cron.minute/tarkista 1>/dev/null But I still got the entry to /var/log/messages every minute, and would like to have that off too... but don't know how. Anyway, now the e-mail is no longer bothering me... Jaska
What happens if the MAILTO is made empty (MAILTO="")
Op donderdag 20 december 2001 11:26, schreef Jaakko Tamminen:
Hi
I have default crontab (SuSE 7.2), and I have added an entry for every minute.
Now cron is sending mail for that entry (ie. evey minute) to root.
How can I prevent this?
Jaska.
Here is the 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 # 1 * * * * root /etc/cron.minute/test_tunnel <--- this is added -*/15 * * * * root test -x /usr/lib/cron/run-crons && ...<cut> 59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly 14 0 * * * root rm -f /var/spool/cron/lastrun/cron.daily 29 0 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly 44 0 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly
Quoting Jaakko Tamminen
* * * * * root /etc/cron.minute/tarkista 1>/dev/null
But I still got the entry to /var/log/messages every minute, and would like to have that off too... but don't know how.
-* * * * * root /etc/cron.minute/tarkista 1>/dev/null Notice the - at the beginning of the line. This only works for root. HTH, Jeffrey -- I don't do Windows and I don't come to work before nine. -- Johnny Paycheck
Hi Thank You, that did the trick! Now I don't have either e-mails or logging-entry from that cron-script. The script itself logs to syslog if there is an error... Do You happen to know if there is a document for the options for crontab? (or anything related to this kind of scripting)? I haven't found anything more than "man", and that is not very deep document... Jaska. Viestissä Perjantai 21. Joulukuuta 2001 00:04, Jeffrey Taylor kirjoitti:
Quoting Jaakko Tamminen
: [snip] * * * * * root /etc/cron.minute/tarkista 1>/dev/null
But I still got the entry to /var/log/messages every minute, and would like to have that off too... but don't know how.
-* * * * * root /etc/cron.minute/tarkista 1>/dev/null
Notice the - at the beginning of the line. This only works for root.
HTH, Jeffrey
Jaakko Tamminen wrote:
I haven't found anything more than "man", and that is not very deep document...
You tried man cron, man crontab? Then try also man 5 crontab.. ;-) Rene -- Omnis enim res, quae dando non deficit, dum habetur et non datur, nondum habetur, quomodo habenda est [Aurelius Augustinus, 4. Jhd] Erklärung und Übsersetzung: http://fsfeurope.org/order/ öffentlicher GnuPG-Schlüssel: Mail an gnupgkey@rene-engelhard.de
Try putting 2>/dev/null at the end of you cron statements... For example.... 59 * * * * "root rm -f /var/spool/cron/lastrun/cron.hourly" 2>/dev/null On Thu, 20 Dec 2001, Jaakko Tamminen wrote:
Hi
Setting the e-mail does not help, I tried that one too :-(
How I managed to get it not to send any e-mail was that I pipe the command with:
* * * * * root /etc/cron.minute/tarkista 1>/dev/null
But I still got the entry to /var/log/messages every minute, and would like to have that off too... but don't know how.
Anyway, now the e-mail is no longer bothering me...
Jaska
What happens if the MAILTO is made empty (MAILTO="")
Op donderdag 20 december 2001 11:26, schreef Jaakko Tamminen:
Hi
I have default crontab (SuSE 7.2), and I have added an entry for every minute.
Now cron is sending mail for that entry (ie. evey minute) to root.
How can I prevent this?
Jaska.
Here is the 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 # 1 * * * * root /etc/cron.minute/test_tunnel <--- this is added -*/15 * * * * root test -x /usr/lib/cron/run-crons && ...<cut> 59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly 14 0 * * * root rm -f /var/spool/cron/lastrun/cron.daily 29 0 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly 44 0 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq and the archives at http://lists.suse.com
participants (5)
-
Dale Appleseth
-
Jaakko Tamminen
-
Jeffrey Taylor
-
Rene Engelhard
-
Richard Bos