Can I run Python Scripts on Windows with JAMS?
Absolutely. To run Python Scripts on Windows in JAMS, take the following steps:
- Ensure Python.exe is installed in a location accessible by JAMS
- Create a Python Execution Method
- Use Python Script in the source of a Python Windows Job
Create a Python_Windows Execution Method
- Click on the Execution Methods shortcut.
- Click on the Add button (plus sign).
- Fill out the Name of the new Execution method.
- Use Command as the base method and edit the new Method after saving.
- Ensure the Type is set to Batch, Extension is set to py and set the Command to the location of Python.exe, followed by "{0}". If Python.exe is in a non-standard location, use the full path.
- Save and Close the Execution Method. Users may now select the new method when creating Jobs.
Use Python Script in the Source of a Python Windows Job
- Click the Add button in the Jobs section to add a new Job
- Name the Job as desired.
- Select the Python_Windows Execution Method from the drop-down list.
- Paste or enter the desired Python code in the Job Source
NOTE: When referencing the location of a PY file, the Command Execution method should be used, referencing the location of python.exe and the PY file. For example:
C:\python\python.exe c:\temp\myScript.py
"Click on the Execution Methods shortcut."
Where?
Hello Jeremy, the Execution Methods shortcut is in the left hand menu. If it doesn't appear there, it may need to be expanded.