Enable Concurrent Script Executions

As a means to optimize resource usage in the tenant the platform dispatcher will prevent multiple concurrent runs of the same script with the same parameter values. There may, however, be certain scripts that need to be able to run concurrently with the same parameter values. To work around the dispatcher supervisor, a script can be adjusted to allow the needed concurrent execution.

  1. Add a string parameter to the script. For this example it will be called $aRandomValue .

    1 2 3 4 5 #Multiple instances of this script will run for the same colour value param(     [Parameter(Mandatory = $false)] [CBSingleSelect]        $aSelect,     [Parameter(Mandatory = $false)] [String]                $aRandomValue )

     

  2. On the Script Parameters tab, edit the Javascript for the $aRandomValue parameter for the OnLoad event -set it as:

    1 2 3 4 //load a random value into the field $('#aRandomValue').val(Date.now()); //hide the field and it's label $('#aRandomValue').hide().closest('tr').prev().hide();

     

  3. The run dialog will then look like this:

Since the $RandomValue parameter will always have a different value, the dispatcher will always allow the script to run (the dispatcher only denies multiple runs of scripts attempting to run with the same parameter values).