Submitting a python job via python

Hi everyone,

I have a python command I would like to run via DL but need to submit the job itself via python as well (as opposed to the manual ‘Submit/PythonSubmission’ option).
I basically have a custom UI that already does what I need to do on the local machine, but now I would like to implement a button that sends it off to the farm instead.

Do I have to use the DeadlineCommand and store the arguments to the python script in a pickled file for the slaves to pick up, or is there a more elegant way?

I have this feeling the solution is right in front of my nose but I can’t see the forest for the trees.

Any help would be greatly appreciated.

Thanks,
frank

Hi Frank,

Since your script is a standalone script, you’ll need to use deadlinecommand to submit the job. You can take a look at our python-based integrated submitters (like Nuke) to see how the submission is done. You can find it in \your\repository\submission\Nuke. It’s just a matter of creating a couple of text files to pass as arguments to deadlinecommand.

To see how these files are created for a python job, you can take a look at the monitor’s python submission script. You’ll find that in \your\repository\scripts\Submission\PythonSubmission.

Cheers,

  • Ryan

Thanks Ryan, got it going now with job file and plugin file.
Thanks,
frank