Scripting - Command Arguments

Command Overview

Database and Repository

Clients and Logs

Workers

Jobs

Tasks

Pools, Groups, and Limits

Users and User Groups

Path and Drive Mapping

AWS Portal and Cloud

Scripting

System Functions and Dialogs

Scans, History, and Reports

Version and Help

Interactive Mode

Prompt

Description:

Turns on the Interactive Deadline Command mode.

After that, you can enter any commands interactively without invoking deadlinecommand on each line.

To exit Interactive Mode, either

  • Enter Exit or Quit,

  • Press CTRL+C,

  • Or if the Promt Time Out was set via -SetPromptTimeOut, wait for the Promt to time out.

If a command is not recognized, the message “Not a valid command.” will be printed.

Syntax:

deadlinecommand -Prompt

Arguments:

Argument

Description

.

No arguments

Example:

C:\>deadlinecommand -Prompt
Pools
    none
    2d
    3d
    mayaarnold
    mayars
    projecta
    projectb
    test
    vray
Groups
    none
    3dsmax
    ae
    anothergroup
    arnold
    c3
    c5test
    draft
    m5large
    m5mid
    m5small
    maya
    newgroup
    redshift
Exit

C:\>

SetPromptTimeOut

Description:

If set to a value other than -1, this is the number of milliseconds before Deadline Command will automatically exit while in interactive mode.

Syntax:

deadlinecommand -SetPromptTimeOut <value>

Arguments:

Argument

Description

<value>

Prompt Timeout value in milliseconds, or -1 to disable.

Exit

Description:

Exits Deadline Interactive mode.

Aliases: Exit, Quit

Syntax:

deadlinecommand -Exit

deadlinecommand -Quit

Arguments:

Argument

Description

.

No arguments

Execute Scripts

ExecuteScript

Description:

Executes the Python script.

Syntax:

deadlinecommand -ExecuteScript <Filename>

Arguments:

Argument

Description

<Filename>

The path to a Python script file

ExecuteScriptNoGui

Description:

Executes the Python script without importing any GUI elements.

Syntax:

deadlinecommand -ExecuteScriptNoGui <Filename>

Arguments:

Argument

Description

<Filename>

The path to a Python script file

Python

PopulatePythonSync

Description:

Adds the PythonSync zip to the user folder in the appropriate place.

Syntax:

deadlinecommand -PopulatePythonSync <PopulatePythonSync>

Arguments:

Argument

Description

<PopulatePythonSync>

The path to the PythonSync.zip.

JSON

Json

Description:

Turn on output as JSON format.

  • A following command in the same command line call will output in JSON format.

  • If running in Interactive Mode using -Prompt, any following commands will format their output as JSON.

Syntax:

deadlinecommand -Json

Arguments:

Argument

Description

.

No arguments

Example:

C:\>deadlinecommand -Json -Pools
{"ok":true,"result":["none","2d","3d","mayaarnold","mayars","projecta","projectb","test","vray"]}

PrettyJson

Description:

Turns on output as Pretty JSON with new lines and indentations.

  • A following command in the same command line call will output in JSON format.

  • If running in Interactive Mode using -Prompt, any following commands will format their output as JSON.

Syntax:

deadlinecommand -PrettyJson

Arguments:

Argument

Description

.

No arguments

Example:

C:\>deadlinecommand -PrettyJson -Pools
{
  "ok": true,
  "result": [
    "none",
    "2d",
    "3d",
    "mayaarnold",
    "mayars",
    "projecta",
    "projectb",
    "test",
    "vray"
  ]
}

NoJson

Description:

Turns off output as JSON. Following commands will switch back to standard output format.

Syntax:

deadlinecommand -NoJson

Arguments:

Argument

Description

.

No arguments

Example:

C:\>deadlinecommand -Prompt
Pools
    none
    2d
    3d
    mayaarnold
    mayars
    projecta
    projectb
    test
    vray
Json
Pools
    {"ok":true,"result":["none","2d","3d","mayaarnold","mayars","projecta","projectb","test","vray"]}
NoJson
Pools
    none
    2d
    3d
    mayaarnold
    mayars
    projecta
    projectb
    test
    vray
Exit

Run Commands

RunCommandForRepository

Description:

Runs the given command on a given repository.

Syntax:

deadlinecommand -RunCommandForRepository <Connection Type> <Connection String> <Command>

Arguments:

Argument

Description

<Connection Type>

The Connection type can be ‘Direct’ or ‘Proxy’

<Connection String>

Path to the repository root or the URL of a proxy repository.

<Command>

The command to execute followed by any additional arguments.

SendEmail

Description:

Sends an email.

Syntax:

deadlinecommand -SendEmail <to <Email>> <subject <Subject>> <message <Message>> [<cc <Email>>] [<attach <Attachment>>]

Arguments:

Argument

Description

<to <Email>>

TO email address

<subject <Subject>>

The subject

<message <Message>>

The message, or the path to the file that contains the message

<cc <Email>>

CC email address (optional)

<attach <Attachment>>

Attachment file (optional)

SendPopupMessage

Description:

Sends a popup message to the Deadline Launcher running on the specified machine(s).

Syntax:

deadlinecommand -SendPopupMessage <Machine Name(s)> <Message> [<Delete Message File>]

Arguments:

Argument

Description

<Machine Name(s)>

The machine name, or a list of machine names separated by commas.

<Message>

The message to send. This can be a string, or a path to a file that contains a message.

<Delete Message File>

(optional) If the message is stored in a file, specify ‘true’ to delete the file after the window is closed.

Example:

C:\>deadlinecommand -SendPopupMessage hpz-1234567890 "Hello Dolly!"

See also

PopupMessage

Plugins

GetPluginNames

Description:

Displays all plugin names.

Aliases: GetPluginNames, Plugins

Syntax:

deadlinecommand -GetPluginNames

deadlinecommand -Plugins

Arguments:

Argument

Description

.

No arguments

InitApplicationPlugins

Description:

Initializes the specified application plugins. This will set their state to disabled if they do not already exist in the database.

Syntax:

deadlinecommand -InitApplicationPlugins <Plugin/s>

Arguments:

Argument

Description

<Plugin/s>

A list of one or more application plugins to initialize. This will not disable plugins that already have a valid setting for state.

Event Plugins

GetEventPluginNames

Description:

Displays all event plugin names.

Syntax:

deadlinecommand -GetEventPluginNames

Arguments:

Argument

Description

.

No arguments

Frame Ranges and Lists

AppendJobFrameRange

Description:

Appends to the Job’s existing frame range.

Syntax:

deadlinecommand -AppendJobFrameRange <Job ID(s)> <Frame List>

Arguments:

Argument

Description

<Job ID(s)>

The Job ID, or a list of Job IDs separated by commas

<Frame List>

The additional frames to append

ParseFrameList

Description:

Parses a frame list.

Syntax:

deadlinecommand -ParseFrameList <frame list> [<combine frames>]

Arguments:

Argument

Description

<frame list>

The list of frames to parse

<combine frames>

If subsequent frames should be combined (optional, defaults to True)

C:\>deadlinecommand -ParseFrameList
    Error: no frame list specified

C:\>deadlinecommand -ParseFrameList 1,2,5,6,7,10
    1-2,5-7,10

C:\>deadlinecommand -ParseFrameList 1-10 false
    1,2,3,4,5,6,7,8,9,10

C:\>deadlinecommand -ParseFrameList 1-100x5
    1,6,11,16,21,26,31,36,41,46,51,56,61,66,71,76,81,86,91,96