crontab 提示 command not found

问答中心分类: Linuxcrontab 提示 command not found
qq979317778 asked 7 年 ago

crontab 提示 command not found
To: root@iZj6cgid3m7wm7dlx2xu6qZ.localdomain
Subject: Cron <root@iZj6cgid3m7wm7dlx2xu6qZ> php /data/wwwroot/www.ssr8.vip/xcat checkjob
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
Precedence: bulk
X-Cron-Env: <XDG_SESSION_ID=434>
X-Cron-Env: <XDG_RUNTIME_DIR=/run/user/0>
X-Cron-Env: <LANG=en_US.UTF-8>
X-Cron-Env: <SHELL=/bin/bash>
X-Cron-Env: <PATH=/sbin:/bin:/usr/sbin:/usr/bin>
X-Cron-Env: <MAILTO=root>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <LOGNAME=root>
X-Cron-Env: <USER=root>
Message-Id: <20170723163601.9F8921EC1A6@iZj6cgid3m7wm7dlx2xu6qZ.localdomain>
Date: Mon, 24 Jul 2017 00:36:01 +0800 (CST)
/bin/bash: php: command not found

1 Answers
oneinstack answered 7 年 ago
php加绝对路径,如:
/usr/local/php/bin/php /data/wwwroot/example.com/test.php