AWS Thinkbox Discussion Forums

Get Submitted JobID - Python

Hello,
I’m modifying the Mantra submission window. I’m trying to submit 2 job, with one dependent on the other. My problem is that I can’t get a JobID from ClientUtils.ExecuteCommand() to use as a dependency. I also tried, ClientUtils.ExecuteCommandAndGetOutput() but it only returns an empty string. How can I get the job id?

From looking at the help file included in dealdinecommand, it looks like the flag you are looking for is:

SubmitMultipleJobs Submits multiple jobs at once
[-dependent] This flag makes each job in the list of jobs specified dependent on the previous job
[-notify] This flag displays a notification window after the jobs have been submitted
[-job ] This flag must precede each list of files for each individual job being submitted. You can also add the -dependsonprevious flag to make a single job dependent on the previous job

Hope that helps!

Cheers,

Hello,

I just want to add on to this an example of how you would use this in submission. An example of this in use is:

deadlinecommand.exe -SubmitMultipleJobs -dependent -job main.job main.info main.mb -job dependent.job dependent.info dependent.mb

You would need to make the job and plug-in fioles beforehand according to this documentation: thinkboxsoftware.com/deadlin … o_Deadline

Hope that is a bit clearer :slight_smile:

It looks like this worked!
Thank you for your help!

Hello again. Looks like I have to resurrect this with an update.
It would still be great to be able to get the JobID of the job that was just submitted. I now have to make something that submits 3 jobs. The third job needs to be dependent on the first two jobs finishing. SubmitMultipleJobs doesn’t seem to cover this scenario since each job added is dependent on the previous job. So I wouldn’t be able to make a job with multiple dependencies as far as I know. To give a better understanding of why I would even need to do something like this, it’s because I need to submit two Mantra jobs, then a third Python job that does cleanup work on the files. But the third Python job should only get executed if both Mantra jobs finish.

Hello,

The best suggestion I have is to write a script that will submit the first two jobs, scrub the output for the job IDs, then use those to submit the third as dependent on the previous two. There is no specific command for the full scope of what you are trying to do, though. Hope that helps.

Cheers,

Privacy | Site terms | Cookie preferences