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_Windows Execution Method
- Use Python Script in the source of a Python_Windows Job
Create a Python_Windows Execution Method
- Navigate to the Execution Methods view in the Configuration section.
- Click the Add button to open the Add an Execution Method Wizard.
- Name the Execution Method. The example here will be named Python_Windows.
- Choose the Command Execution Method as a base.
- Ensure the Edit the Execution Method definition after adding box is checked, then click Finish.
- The Execution Method Properties dialog box will appear. Navigate to the Execution tab.
- Ensure the Type is set to Batch, 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.
- Navigate to the Source tab and set the Default File Extension to py.
- Save and Close the Execution Method Properties, then Restart the JAMS Client.
- Users may now select the Python_Windows execution method when creating Jobs. Python Script may be used in the Source of a job using the new Execution Method.
Use Python Script in the Source of a Python_Windows Job
- Click the Add button in the Jobs section to open the Job Creation Wizard.
- Name the Job as desired.
- Select the Python_Windows Execution Method from the drop-down list.
- Set Notify and Run-As options as desired.
- Paste or enter the desired Python code in the Job Source.
- Set Schedule options as desired, then Save.
Comments