0
此通过命令行运行:为什么我的curl命令不能通过cron执行?
m=`time (my_command &> /dev/null) 2>&1` && curl -d "m=$m" https://nosnch.in/foo_token
但是,当通过cron运行,my_command执行,但curl命令没有。
我的cron日志具有以下的输出:
Nov 22 21:10:01 cron1 CROND[3016]: (root) CMD (m=`time (my_command &> /dev/null) 2>&1` && curl -d "m=$m" "https://nosnch.in/foo_token")
任何想法?
添加完整路径是修复。谢谢! – 2015-03-02 06:34:12