一个解决办法: 将 crontab 中 命令的标准输出和标准错误输出重定向到 /dev/null 比如: * * * * * /usr/bin/date >/dev/null 2>&1
2006/1/19, Qingning Huo <[EMAIL PROTECTED]>: > On Tue, Jan 17, 2006 at 11:53:41AM +0800, "肖盛文 (Faris Xiao)" wrote: > > > > man cron > > > > 可以看到如下将 crontab 的输出发邮件的说明: > > 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). > > > > 请问有没有一个配置选项,让 crontab 不发邮件? > > > > 我找了半天没有找到. > > > > > > Quote "man 5 crontab" > > If MAILTO is defined (and non-empty), mail is sent to the user so > named. If MAILTO is defined but empty (MAILTO=""), no mail will be > sent. Otherwise mail is sent to the owner of the crontab. > > Qingning > > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.2 (GNU/Linux) > > iD8DBQFDzqQofYhzMmgvs9oRAq4NAKCkQnXEKNqanVKfKiQnPowTAAxdwQCfbmvy > CqIYFsi8nyny5NHTF15nT+0= > =MMI3 > -----END PGP SIGNATURE----- > > > -- 胡挺 [EMAIL PROTECTED]

