Centos7上crontab不执行

来自linux中国网wiki
跳到导航 跳到搜索

腾迅云centos7上crontab不执行

定时任务不成功   看 cron log 

 CROND[5388]: (root) CMD (bash  /root/evan/love )
Apr 23 19:33:02 aliyun-jump-host CROND[5387]: (root) MAIL (mailed 294 bytes of output but got status 0x004b#012)
Apr 23 19:34:01 aliyun-jump-host CROND[5403]: (root) CMD (bash  /root/evan/love )
Apr 23 19:34:01 aliyun-jump-host CROND[5402]: (root) MAIL (mailed 294 bytes of output but got status 0x004b#012)
^C


全不成功的 
]# crontab  -l
*/1  *  *  * *   /bin/bash  /root/evan/love 

#解决办法 
vim  /etc/postfix/main.cf

inet_interfaces = localhost

# Enable IPv4, and IPv6 if supported
inet_protocols = all


删掉或者注释  添加 

inet_interfaces = all


还有写命令要 全部绝对路径

https://cloud.tencent.com/developer/article/1594636

https://blog.csdn.net/sd4493091/article/details/83345661