Skip to content

Examples of the script package

General examples

ScriptBeforeCompare

This script automatically unpacks ZIP files before comparison so that they can be compared afterwards. The script is copied to the Server scripting directory for automatic update of client to be effective.

Script:

Function ScriptBeforeCompare
{
    provideArchive
    unzip
}

ScriptAfterUpload

This script triggers an automatic output of a warning if after the comparison no differences were found. The script is copied to the Server scripting directory to be effective.

Script:

Function ScriptAfterUpload
{
    Warning.IfDateEqual
}

ScriptBeforeUpload

This script executes a ping command to an IP address of a controller before an upload job to check whether the controller can be reached. The script is copied to the Server scripting directory to be effective.

Script:

Function ScriptBeforeUpload
{
    /////////////////////////////////////////////////
    //ping has three parameters:
    //Ip: <IP> mandatory
    //Loop: <Number of repeats optional> optional, default = 1
    //Sleep: <Milliseconds, waiting time after a ping> optional, default = 0;

    ping Ip:$vdog::uploadjob->5002 loop:3 sleep:3000

    /////////////////////////////////////////////////
}