Monitor Job Scripts


Monitor job scripts are used to perform custom actions on the selected jobs in the job list, and they are found in the Scripts section of the job right-click menu. A few scripts have been included with the Deadline Repository installation, which you can use for a reference. Installing your custom Monitor job scripts is quite simple, just follow the steps below.

Installing Your Monitor Job Script

To install a new Monitor job script, follow these steps:

1. Open the \\your\repository\scripts\Jobs folder.

2. Create a new folder to store your submission script. The name of the folder will be the name of the menu item for your script in the Monitor.

Note that all underscores in the folder name are replaced with spaces in the menu item.

3. Open the new folder, and create a vbscript file using the new folder's name as the filename prefix.

For example, if the new folder's name was My_Script, the vbscript file should be called My_Script.vbs.

4. As an option, you can create a 16x16 icon file that will appear next to the menu item, and place it in the new script folder. Just give the icon file the same filename prefix as the vbscript file.

For example, if your vbscript file is called My_Script.vbs, the icon file should be called My_Script.ico.

5. As another option, you can configure the script to be available in certain contexts. Simply create an ini file in the new script folder, giving it the same filename prefix as the vbscript file.

For example, if your vbscript file is called My_Script.vbs, the configuration file should be called My_Script.ini.

The following settings can be configured:

  • Multiselect=<true/false>

Whether or not the script is available when multiple jobs are selected (default = true).

  • SuperUser=<true/false>

Whether or not the script is only available in Super User mode (default = false).

  • JobUser=<true/false>

Whether or not the script is only available for the selected job(s) user (default = true).

  • Plugins=<plugin;plugin;...>

The script will only be available for jobs that use one of the specified plugins. If the list is empty, the script will be available for all plugins (default).

  • JobStates=<state;state;...>

The script will only be available for jobs that are in one of the specified states. If the list is empty, the script will be available for all job states (default).

6. Now if you reopen or refresh the monitor, you should see a menu item in the Scripts section of the job right-click menu for your submission script, even if the script file is empty. Of course, clicking the menu item for you script will do nothing at this point.

Monitor Job Specific Reference

The following functions can only be used in a Monitor job script.

JobUtils Functions

These functions are called by using JobUtils.function

Function Description
array GetSelectedJobNames() Gets the list of selected job names.
array GetSelectedJobIds() Gets the list of selected job ids.
string GetDataFilename() Gets the scene file for the first selected job.
string GetFirstOutputFilename() Gets the first output filename for the first selected job.
int GetFirstFrame() Gets the first frame for the first selected job.
int GetLastFrame() Gets the last frame for the first selected job.
int GetPriority() Gets the priority for the first selected job.
string GetPool() Gets the pool for the first selected job.
bool GetPoolExclusive() Gets the pool exclusive setting for the first selected job.
string GetName() Gets the job name for the first selected job.
string GetJobId() Gets the job ID for the first selected job.
string GetDepartment() Gets the department for the first selected job.
string GetCategory() Gets the category for the first selected job.
variant GetCurrentJobValue( string property ) Gets the specified property for the first selected job, if it exists.
void SetCurrentJobValue( string property, variant value ) Sets the specified property for the first selected job, if it exists.
variant GetCurrentPluginValue( string property ) Gets the specified plugin property for the first selected job, if it exists.
void SetCurrentPluginValue( string property, variant value ) Sets the specified plugin property for the first selected job, if it exists.