0

cronジョブに対して次のコマンドを実行したい

python test.py -sau 0 -bg 200000 -t mcs3245 > g2g.log

以下のようなcronジョブをセットアップしました

5 0 * * * /local/mnt/workspace/username/scripts/python test.py -sau 0 -bg 200000 -t mcs3245 > g2g.log 

次のエラーが表示されます

/bin/sh: /local/mnt/workspace/username/scripts/python: No such file or directory

誰が何が間違っているのか、これを設定する方法を手伝ってもらえますか?

4

1 に答える 1

0

あなたのpythonインストールのディレクトリでない限り/local/mnt/workspace/username/scripts/、私は次のようなものを提案します:

5 0 * * * /usr/bin/python /path/to/script/test.py -sau 0 -bg 200000 -t mcs3245 > g2g.log

ユーザー USERNAME としてスクリプトを実行する場合:

5 0 * * * USERNAME /usr/bin/python /path/to/script/test.py -sau 0 -bg 200000 -t mcs3245 > g2g.log

ここで最後のものを見つけました superuser.com

于 2013-01-07T08:59:56.790 に答える