crond
crond sends email notifications automatically. However, these emails are not needed. How to disabled it?
crond自动发送电子邮件通知。 但是,不需要这些电子邮件。 如何禁用它?
If your command does not anything printed to STDOUT or STDERR, there is not emails send. You can redirect 2 and 1 to /dev/null at the end of your command.
如果您的命令没有打印到STDOUT或STDERR,则不会发送电子邮件。 您可以在命令末尾将2和1重定向到/ dev / null。
You can also set the MAILTO
variable to empty by add this line to your crontab -e
:
您还可以通过MAILTO
下行添加到crontab -e
来将MAILTO
变量设置为空:
MAILTO=""
Answered by Eric Z Ma.
埃里克·马(Eric Z Ma)回答。
翻译自: https://www.systutorials.com/how-to-disable-the-email-notification-by-crond/
crond