AWS Thinkbox Discussion Forums

Deadline dependency in group submission

Hey! Im pretty new to deadline. I need help with a maxscript when submitting a job to deadline.
I want the dependencies under the same group as shown below:
Capture

My script works but I need to know how to group the dependency under the same deadline job.
Here is the current maxscript that I have (only the part where I write to the job submission file):
(The **** is what I dont want to show)

if doPostProcessPS == true then (
local cmdResult = undefined

  	SubmitInfoFile = "Path_To_File ****\\LukasTestDEADLINE" + "\\cmd_submit_info.job"
  	local fileHandle = createfile SubmitInfoFile
  	format "Plugin=CommandLine\n" to:fileHandle			
  	format "Name=%\n" "Test___" to:fileHandle
  	format "UserName=%\n" "****" to:fileHandle
  	format "Whitelist=%\n" "****" to:fileHandle
  	format "JobDependency0=%\n" SMTDSettings.DeadlineSubmissionLastJobID to:fileHandle
  	close fileHandle
  	
  	format "\t... creating Deadline JobInfoFile\n"
  	JobInfoFile = "Path_To_File****\\LukasTestDEADLINE"  + "\\cmd_job_info.job"
  	fileHandle = createfile JobInfoFile
  	format "Executable=%\n" ("Path_To_File****\\LukasTestDEADLINE\\dist\\test1\\test1.exe") to:fileHandle
  	close fileHandle
  	
  	initialArgs = "\""+SubmitInfoFile+"\" \""+JobInfoFile+"\" " 
  	cmdResult = SMTDFunctions.waitForCommandToComplete initialArgs SMTDSettings.TimeoutSubmission

  	renderMsg = SMTDFunctions.getRenderMessage() 
  	SMTDFunctions.getJobIDFromMessage renderMsg
  	if cmdResult == #success then (
  		format "\nCommand job submitted successfully as Job %.\n-------------------------------------------------------------\n%\n-------------------------------------------------------------\n" SMTDSettings.DeadlineSubmissionLastJobID renderMsg
  	) else (
  		format "Job Submission FAILED.\n-------------------------------------------------------------\n%\n-------------------------------------------------------------\n" renderMsg
  	)
  )
1 Like

Set the key value pair: BatchName=somevalue to the same value in the job info files and they should group together in monitor.

-b

2 Likes

Cool! Thanks! :smiley:

Thank you! Can you also tell me what the variable name is for BatchName in SMTDSettings.
For example: SMTDSettings.BatchName
This example does not work

BatchName is only set when the job is sent to the farm (in job info file). As far as I know thereā€™s no ā€œSMTDSettings.BatchNameā€ as such.
The default seems to be using SMTDSettings.JobName as the batch name.

1 Like

SMTD adds batch names in some cases, for example when submitting multiple camera views from the same job just to keep things clean.

While there is no SMTDSettings property for the batch name, there are a few functions in the SMTDFunctions struct that accept an optional batchName: argument. In your case, since you are writing your own Job files, you can simply output the BatchName= key/value pair yourself to the job info file. But if you are using any of the provided functions, you can call things like

SMTDFunctions.SubmitJobFromUI batchName:"YourNameHere"

which is equivalent to pressing the SUBMIT button the in the SMTD UI,

SMTDFunctions.CreateSubmitInfoFile SMTDPaths.SubmitInfoFile batchName:"YourNameHere"

which writes the Job Info File for you. In these cases, providing an explicit batchName: keyword argument will write the entry for you, ensuring multiple calls to these functions with the same batch name will put all resulting jobs in the same batch group.

2 Likes
Privacy | Site terms | Cookie preferences