我正在尝试通过cron运行casper.js脚本.当我手动运行脚本时,一切正常,但是当我通过cron运行它时,我得到以下错误:
Traceback (most recent call last):
File "/usr/local/bin/casperjs",line 46,in
status = subprocess.call(CASPER_COMMAND)
File "/usr/lib/python2.6/subprocess.py",line 480,in call
return Popen(*popenargs,**kwargs).wait()
File "/usr/lib/python2.6/subprocess.py",line 633,in __init__
errread,errwrite)
File "/usr/lib/python2.6/subprocess.py",line 1139,in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
我的crontab条目是:
30 9 * * * /usr/local/bin / casperjs lib / fsaupload.js arg1 arg2 arg3
我也试过了
30 9 * * * python /usr/local/bin / casperjs lib / fsaupload.js arg1 arg2 arg3
这给了我相同的结果.有任何想法吗?我猜它可能是路径问题,但不知道从哪里开始!