Hey,
I was just wondering if there was a way to run a custom .bat script before running a task (on the node, before each task)?
I don’t want to have to do it, but it’s an option I need to explore.
Thanks,
Shaun.
Hey,
I was just wondering if there was a way to run a custom .bat script before running a task (on the node, before each task)?
I don’t want to have to do it, but it’s an option I need to explore.
Thanks,
Shaun.
Would a pre-task script assigned to the job props work for you?
docs.thinkboxsoftware.com/produc … ml#scripts
Hey Mike,
Cool, so I have to add a “PreTaskScript=” line to the “Job Info File” which gets called on submission.
The only trouble is I would have to add this “Job Info File” modification to the existing submitter that comes bundled with deadline, that part sounds tricky… (adding the argument to the softimage submitter for example)
The documentation says this:
deadlinecommand [Job Info File] [Plug-in Info File] [Auxiliary File 1] [Auxiliary File 2]
Would this be the line in the submitter I would have to change (to add in my custom job file)?:
proc = subprocess.Popen([deadlineCommand, ‘-getrepositorypath’, folder], cwd=deadlineBin, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, startupinfo=startupinfo)
In the Softimage in-app submitter functions py file (SoftimageToDeadlineFunctions.py), in function: “CreateSubmissionInfoFile”, you would need to add this line:
PreTaskScript=<path to script>
such as like this:
submitInfoFile.write("\nPreTaskScript=<path to script>")
where “” is the network file path to the script to run. Take a look at the code to follow the Python syntax.
More info on other manual job submission KEY=VALUE pairs (KVP’s) here:
docs.thinkboxsoftware.com/produc … ml#scripts
Thanks Mike, that’s helpful.
One more question though.
Would I be making my modifications to the python file sitting in the global repo?
I.e, here: <deadline8_repo>\submission\Softimage\Main\SoftimageToDeadlineFunctions.py
I also found that file cached on my local computer as well…
Correct. Edit the global, server0side repository version as the local version is a cache and will get overwritten between sessions if it has been changed on the server side. Of course, I’m sure you will want to add some kind of logic to your Python submitter as you might not want to submit this preTask script for ALL jobs being submitted from XSI.
Thank you for the help!