[Centos7.2]关于crontab报错

时间:2022-07-22
本文章向大家介绍[Centos7.2]关于crontab报错,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

本文编写于 205 天前,最后修改于 205 天前,其中某些信息可能已经过时。

在设置定时任务时,发现定时任务没有执行 查看crond的运行状态

systemctl status crond.service

发现报错:

parameter inet_interfaces: no local interface found

查看centos中的postfix日志

tail -n 15 /var/log/maillog

返回错误为:

postfix: fatal: parameter inet_interfaces: no local interface found for ::1

这时编辑postfix配置文件

vi  /etc/postfix/main.cf

修改以下内容

发现配置为:

inet_interfaces = localhost
inet_protocols = all

改成:

inet_interfaces = all
inet_protocols = all

再重新启动postfix

systemctl start postfix