开发者

Python is not existing when ran from System Scheduler

开发者 https://www.devze.com 2023-01-29 21:28 出处:网络
I have made a batch scri开发者_JAVA技巧pt which runs a Python application. This batch script is triggered by a program called System Scheduler, but when the program runs the batch script, it says that

I have made a batch scri开发者_JAVA技巧pt which runs a Python application. This batch script is triggered by a program called System Scheduler, but when the program runs the batch script, it says that Python is not exisiting.

When I run my batch script manually, I get no error.

Can anyone explain this or come up with a solution?


Probably the $PATH is not set properly when called from scheduler. Try changing the command called from

python yourscript.py

to

/usr/bin/python yourscript.py

(Substitute the actual path to python on your system, which you can find with:

$ which python


Check the user context that System Scheduler is running under and ensure the location of Python is in it's PATH.

0

精彩评论

暂无评论...
验证码 换一张
取 消