- February 21, 2019 at 5:51 pm #17747Donna ZehlKeymaster
First make sure python is in your user & system path.
We also introduced a requirement that scripts on Windows now need a Unix-style shebang line at the very top, which HVR then interprets ie..
At the start of your python script it is recommended you set he shebang.
This actually works on Windows and Linux
On Linux, however, it is more usual to see the format of
The path to python in the scheduler’s environment should be checked/set as well.
- First make sure python is in your user & system path. If exe is not in your path you have to add it and if your running Windows you must restart your PC for it to take effect.
- At the start of your python script it is recommended you set the shebang.
On Window has the format
Or on Linux that has the format of
An example script on a Windows would look like this and save with the extension .py, ie. test.py
#!python import os import sys if __name__ == "__main__": print("success") sys.exit(0)
Most of agent plugins run on the integrate node.
AgentPlugin screen would be defined like this for the location MSTGT, a Sqlserver target with the channel name chn1 calling the python script ‘test.py’ running on target Windows server with the path in my example @ C:Usershvrtestpythonscripts.
You should also run a test if you can run via command line like this on Windows to verify it works, for example
python <script fully pathed> C:usershvtestpython C:usershvrtestpythonscriptstest.py
- You must be logged in to reply to this topic.