AWS Thinkbox Discussion Forums

Adding post job script to Nuke job submission

Hi there:

I added the following line of code to SubmitNukeToDealine.py, but the script is not showing in Deadline GUI under Job Properties -> Post job Script …?

To run postscript to remove temp files

fileHandle.write(“PostJobScript=%s\n” % “/prod/Deadline/scripts/PrePostJobScripts/rmNukeTmpFiles.py”)

#===================== rmNukeTmpFiles.py ===================

import os
from System.IO import *
from Deadline.Events import *
from Deadline.Scripting import *
from Deadline.Jobs import *
import sys
import re

def main( *args ):

get the render folder from deadline

print ‘\n========================\n General deadline convert postjobscript is started!\n’
outputDirectories = SlaveUtils.GetCurrentJobValue( “OutputDirectories” )
outputFilenames = SlaveUtils.GetCurrentJobValue( “OutputFileNames” )
print outputDirectories

hi,

this should only apply to new jobs submitted,
if you check the submission parmas tab on a job, does it show up there?

Hello kwatts

Its not showing up anywhere - I have to manually add after the job submission to the Job Properties ->Scripts->Post Job Script . I tried looking for the job file to check to se if this line was written to the job file - but was not able to locate the job file - do you where does the job file gets created ?

Thanks
/Biju

a few follow up questions:

deadline version?

when your adding the extra line to the submission code, its going under this line:
fileHandle = open( jobInfoFile, "w" ) ?

the location of the SubmitNukeToDealine.py is in your nuke path, so your getting the the changed file?

as for location of the ini files it writes, id find this line in the submit code:
tempResults = CallDeadlineCommand( args )
add a print args to see where all the files are writing to.

hope this helps.
kym

That kwatts it worked - I was editing the wrong file. It now works seamlessly :smile:

Cheers
/Biju

1 Like
Privacy | Site terms | Cookie preferences