Command Script

Job Submission

You can submit Command Script jobs from the Monitor. Command Script can execute a series of command lines, which can be configured to do anything from rendering to folder synchronization.

../_images/sub_cmdscript.png

Submission Options

The general Deadline options are explained in the Job Submission documentation. The Command Script specific options are:

  • Commands To Execute: Specify a list of commands to execute by either typing them in, or by loading them from a file. You also have the option to save the current list of commands to a file. To insert file or folder paths into the Commands field, use the Insert File Path or Insert Folder Path buttons.
  • Startup Directory: The directory where each command will startup. This is optional, and if left blank, the executable’s directory will be used as the startup directory.
  • Commands Per Task: Number of commands that will be executed for each task.

Manual Submission

Command Script jobs can also be manually submitted from the command line.

Submission File Setup

Three files are required for submission:

  • the Job Info File
  • the Plugin Info File
  • the Command file

The Job Info file contains the general job options, which are explained in the Job Submission documentation.

The Plugin info file contains one line (this is the directory where each command will startup):

StartupDirectory=...

The Command file contains the list of commands to run. There should be one command per line, and no lines should be left blank. If you’re executable path has a space in it, make sure to put quotes around the path. The idea is that one frame in the job represents one command in the Command file. For example, let’s say that your Command file contains the following:

"C:\Program Files\Executable1.exe"
"C:\Program Files\Executable1.exe" -param1
"C:\Program Files\Executable1.exe"
"C:\Program Files\Executable1.exe" -param1 -param2
"C:\Program Files\Executable1.exe"

Because there are five commands, the Frames specified in the Job Info File should be set to 0-4. If the Chunksize is set to 1, then a separate task will be created for each command. When a slave dequeues a task, it will run the command that is on the corresponding line number in the Command file. Note that the frame range specified must start at 0.

If you wish to run the commands in the order that they appear in the Command file, you can do so by setting the MachineLimit in the Job Info File to 1. Only one machine will render the job at a given time, thus dequeuing each task in order. However, if a task throws an error, the slave will move on to dequeue next task.

To submit the job, run the following command (where DEADLINE_BIN is the path to the Deadline bin directory):

DEADLINE_BIN\deadlinecommand JobInfoFile PluginInfoFile CommandFile

Manual Submission Example

This example demonstrates how you can render a single frame from a Maya scene with different options, and direct the output to a specific location. To get the submission script, download Example Script For Command Script Plugin from the Miscellaneous Deadline Downloads Page. To run the script, run the following command (you must have Perl installed):

Perl SubmitMayaCommandScript.pl "SceneFile.mb" FrameNumber "OutputPath"

Plug-in Configuration

The Command Script plug-in does not require any configuration.

FAQ

Can I use executables with spaces in the path?

Yes, just add quotes around the executable path.