Reputation: 13
I am new to Jenkins and want to schedule a job to execute a local python script. I tried copying all my python script into the "execute shell" however it doesn't work as it doesn't recognize some of the libraries as import jenkins and import p4 in my script. Any Idea how I could fix that?
Upvotes: 0
Views: 3104
Reputation: 844
If you want to execute a python script using "execute shell" parameters you should use shell syntax:
#!/bin/sh
python /home/Username/my_script.py
The absolute path to the script is required.
Upvotes: 3