Running Python scripts in Windows for JAMS v6.x

Follow

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

  1. Navigate to the Execution Methods view in the Configuration section.
  2. Click the Add button to open the Add an Execution Method Wizard.
  3. Name the Execution Method. The example here will be named Python_Windows.

  4. Choose the Command Execution Method as a base.
  5. Ensure the Edit the Execution Method definition after adding box is checked, then click Finish.
  6. The Execution Method Properties dialog box will appear. Navigate to the Execution tab.
  7. 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.
  8. Navigate to the Source tab and set the Default File Extension to py.

  9. Save and Close the Execution Method Properties, then Restart the JAMS Client.
  10. 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

  1. Click the Add button in the Jobs section to open the Job Creation Wizard.
  2. Name the Job as desired.
  3. Select the Python_Windows Execution Method from the drop-down list.
  4. Set Notify and Run-As options as desired. 
  5. Paste or enter the desired Python code in the Job Source.
  6. Set Schedule options as desired, then Save.

 

 

Have more questions? Submit a request

Comments