Hi!
Could you please help me with pre job script? I need to suspend all uncompleted (active or queued or pending) jobs in defined pool (let’s call it “tempPool” for example). I think it’s pretty easy, but i’m novice in python scripting, so if you don’t mind could you paste code here? With all “import” lines. If i would have a script that works, it will be easy for me to manage with scripts further. Thank you!
i wrote something like that, but i don’t quite sure that it’s right:
from Deadline.Scripting import *
def _main_():
allJobs = GetJobs()
for i in allJobs:
if (allJobs[i].JobPool == "mov_final"):
if (allJobs[i].JobStatus == "Pending" or allJobs[i].JobStatus == "Active"):
allJobs[i].JobStatus = "Suspended"