开发者社区> 问答> 正文

云服务器 ECS Linux Crontab 执行 PHP 程序失败 */1 * * * * /opt/lampp/htdocs/demon monitor >> /tmp/crontab/monitor.log #查看 /tmp/crontab/monitor.log 为空 $ ll -sh 0 -rwxrwxrwx 1 root root 0 8月 11 07:58 monitor.log #查看crontab日志,正常执行了 Aug 11 07:37:01 iZ25v3bf76fZ CROND[1

云服务器 ECS Linux Crontab 执行 PHP 程序失败
/1 * /opt/lampp/htdocs/demon monitor >> /tmp/crontab/monitor.log

查看 /tmp/crontab/monitor.log 为空

$ ll -sh
0 -rwxrwxrwx 1 root root 0 8月 11 07:58 monitor.log

查看crontab日志,正常执行了

Aug 11 07:37:01 iZ25v3bf76fZ CROND[1914]: (root) CMD (/opt/lampp/htdocs/demon monitor >> /tmp/crontab/monitor.log)
Aug 11 07:37:01 iZ25v3bf76fZ CROND[1923]: (root) CMD (/opt/lampp/htdocs/demon monitor >> /tmp/crontab/monitor.log)

单独直接执行程序正常

$ /opt/lampp/htdocs/demon monitor >> /tmp/crontab/monitor.log
$ ll -sh
4.0K -rwxrwxrwx 1 root root 1.9K 8月 11 08:00 monitor.log

展开
收起
行者武松 2018-01-09 15:49:41 3909 0
1 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
Alibaba Cloud Linux 3 发布 立即下载
ECS系统指南之Linux系统诊断 立即下载
ECS运维指南 之 Linux系统诊断 立即下载