skip to main content
RiverSMART Help : Using RiverSMART : Script Execution for Notifications
Script Execution for Notifications
After scenarios have simulated, you can execute a Windows batch script or any executable to notify you of the status. It is up to you to write the script, typically it will be a Windows Batch Script (.bat) file but can be any other executable (.exe).
To configure when and how simulation notifications are sent, select Workspace, then Options from the RiverSMART menu; alternatively, select the Options button on the RiverSMART toolbar.
In the Group area of the Options dialog box, select Script Execution.
Select one or more of the following check boxes to specify when to execute the notification batch scripts.
• Execute after each scenario—execute the batch script after each scenario has simulated. The script arguments are the scenario name and status (SUCCEEDED or FAILED).
• Execute after successful scenarios—execute the batch script after each successful scenario simulation. The script arguments are the scenario name and status (SUCCEEDED).
• Execute after unsuccessful scenarios—execute the batch script after each unsuccessful scenario simulation. The script arguments are the scenario name and status (FAILED).
• Execute after all scenarios have finished—execute the batch script once after all scenarios have simulated. The script has no arguments.
If diagnostics are enabled, as described in theWorkspace Menu section, the Diagnostics Window displays messages generated by the batch scripts. It also displays information about the execution of the batch scripts themselves, including any errors.
If you select the Stop simulating scenarios if script execution fails check box, RiverSMART will stop simulating scenarios when there is an error in the execution of a script or the script/executable finishes unsuccessfully (with a non-zero status. This option prevents situations in which simulations are failing but no notifications are sent, and you are therefore not able to intervene.
Revised: 08/04/2021