Centos 6.4 上的 logwatch

Centos 6.4 上的 logwatch

我的 logwatch 配置正确,手动发出命令时可以正常工作

/usr/sbin/logwatch

我将其添加到 root 的 crontab 中,并且当我执行 make 时它会正确列出,crontab -l结果为:

0 5 * * * /etc/cron.daily/0logwatch
0 2 * * * /usr/sbin/logwatch
0 3 * * * /etc/cron.daily/one_of_my_scripts
0 4 * * * /etc/cron.daily/another_script

我的脚本运行良好,但 logwatch 不起作用,尽管我使用直接调用在 crontab 中添加了两次,并使用了准备从 cron.daily 运行的脚本

/var/log/cron 似乎不记录每个用户的 crontab 活动

有什么线索吗?

答案1

我按照@lain 的链接操作(感谢@lain),设置了 MAILTO 变量,等待报告电子邮件,该电子邮件告知我问题来自 sendmail,它位于 /usr/sbin 下,默认情况下未启用 crontab 条目。我刚刚调整了 PATH,一切正常

相关内容