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?
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.
thanks for the usual quick reply! 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)?
The actual submission process differs for different applications, but generally the job files are as follows:
Job Info File (general job properties, like plugin, priority, pool, etc).
Plugin Info File (properties that are specific to the plugin that will render this job, like 3dsmax, Maya, Nuke, etc).
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)
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?
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).
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