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.
精彩评论