心态决定命运
分类: LINUX
2017-07-11 09:41:12
[root@mw1 postfix]# man cron
DESCRIPTION
Cron searches /var/spool/cron for crontab files which are named after accounts in crontabs found are loaded into memory. Cron also searches for /etc/crontab and the
files in the directory, which are in a different format (see crontab(5) ). Cron then wakes up every minute, examining all stored crontabs, checking each command to see
if it should be run in the current minute. When executing commands, any output is mailed to the owner of the crontab (or to the user named in the MAILTO environment
variable in the crontab, if such exists).
(注意:如果sendmail或者postfix正常运行,则会在/var/mail目录下产生大量的邮件,也会堆积) 2, 解决方案: 在cron的第一行加入 MAILTO=""便可,这样执行当前用户的Cron时,不会发送邮件。 Please add the MAILTO="" in the
head of cron ,
please see the blow sample. [root@mw1 postfix]# crontab
-e MAILTO="" */5 * * * *
/opt/OCMonitor/bin//ocSysMonitor -top -sar –netfmt 2012-03-28.