Monitor Slave Scripts


Monitor slave scripts are used to perform custom actions on the selected slaves in the job list, and they are found in the Scripts section of the slave 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 slave scripts is quite simple, just follow the steps below.

Installing Your Monitor Slave Script

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

1. Open the \\your\repository\scripts\Slaves 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. Now if you reopen or refresh the monitor, you should see a menu item in the Scripts section of the slave 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 Slave Specific Reference

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

SlaveUtils Functions

These functions are called by using SlaveUtils.function

Function Description
string GetSelectedSlaveName() Gets the first selected slave name.
array GetSelectedSlaveNames() Gets the list of selected slave names.
array GetAssignedPools( string slaveName ) Gets the list of assigned pools for the specified slave.
array GetExcludedPools( string slaveName ) Gets the list of excluded pools for the specified slave.
string GetDescription( string slaveName ) Gets the description for the specified slave.
string GetComment( string slaveName ) Gets the comment for the specified slave.
bool GetEnabled( string slaveName ) Gets if the specified slave is enabled.
variant GetSlaveInfoValue( string slaveName, string property ) Gets a property value from the specified slave's SlaveInfo file.
variant GetSlaveSettingValue( string slaveName, string property ) Gets a property value from the specified slave's settings.
void SendRemoteCommand( string slaveName, string command ) Sends the specified command to the specified slave and waits for it to respond.
void SendRemoteCommandNoWait( string slaveName, string command ) Sends the specified command to the specified slave and does not wait for it to respond.