Maya post job script

Hi,

I would like to add the option for the user to include a deadline postjobscript when he submits a job. I can easily modify the submitter gui to have the checkboxes, but when submitting as far as I know it only spits out a “maya_deadline_job.job” file, and the postjobscript should be in the other job file (“999_…_…”). How can I get that file, or how can I pass the information of the script path?

Thanks,
Gabor

Hi Gabor,

The submitter writes to two files:

  • maya_deadline_info.job
  • maya_deadline_job.job

You’ll want to write the post job script setting to the maya_deadline_info.job file (which is used by Deadline after submission to build up the “999_…_…” file). Take a look at SubmitMayaToDeadline.mel in \your\repository\submission\Maya and find the file where things like Plugin, Frames, Pool, Group, etc are being written to. This is the maya_deadline_info.job file.

Hope this helps!

  • Ryan

Hi Ryan,

thanks for the usual quick reply! :slight_smile: I missed that it generates 2 separates files, and found only the maya_deadline_job.job in the job folder. Now I got it!
Is there an overview somewhere about the whole process of submission (where, which files are generating etc)?

Thanks,
Gabor

No problem!

The general submission documentation can be found here:
thinkboxsoftware.com/deadline-5-submission/

Here is the section about the files that are submitted with the job:
thinkboxsoftware.com/deadlin … o_Deadline

The actual submission process differs for different applications, but generally the job files are as follows:

  1. Job Info File (general job properties, like plugin, priority, pool, etc).
  2. Plugin Info File (properties that are specific to the plugin that will render this job, like 3dsmax, Maya, Nuke, etc).
  3. Scene File (if it is being submitted with the job) or other job auxiliary files (for example, there is an xml file that gets submitted with the QT generation jobs)

Hope that helps!

  • Ryan

Thanks Ryan for the info! Very useful!
Cheers,
Gabor

Hi,

another question regarding this: I can’t get the extrainfo property, in a postjob script. I used this code, as in the documentation:

myJob = Job() slatetemplatepath = myJob.JobExtraInfo0 print ("template path: " + slatetemplatepath + "\n")
It gives empty string back, despite it is set properly in the monitor.
What am I missing?

Thanks,
Gabor

Okay, I’m stupid, got it, I need as the others:
SlaveUtils.GetCurrentJobValue( “ExtraInfo0”)
But how I get the key-value pair?
Thanks,
Gabor

Just to confirm, which version of Deadline are you using? If you’re using Deadline 5, you should be able to get this info like this:

myJob = GetJob()
slatetemplatepath  = myJob.JobExtraInfo0   
print ("template path: " + slatetemplatepath + "\n")

myValue = myJob.GetJobExtraInfoKeyValue( "myKey" )

Note that I’m using “GetJob()” to get the current job. When you were using “Job()” in your example, that actually just calls the Job object’s constructor, which means you were creating a brand new instance of a Job (and would explain why you were getting an empty string back).

Cheers,

  • Ryan

Hi Ryan,

thanks for the info. Let me ask 1 more: I just finished the first part of our dailies system, using postjob scripts. I’ve read about event plugins, what is the main advantages of this over the postjob scripts (where I know a lot of useful information about the job)?
Thanks,
Gabor

Hi,
You can make event plugins execute for lots of different job types if you want. You can also make the event plugin ‘trigger’ or other events such as when a job is suspended or failed, which a “post-job” script is unable to detect. You also don’t need to “attach” or “submit” an event plugin to a job like a post-job script, as it will automatically get executed when a certain event happens in Deadline. Check out the Deadline manual for more info.
HTH,
Mike

Thanks Mike, looking into it!
Gabor