Setting up scheduled forecasts
When using a live forecasting system, a scheduled forecast can be established simply through using the Manual Forecast display in the Operator Client.
DELFT-FEWS will, however, not allow a manually submitted forecast to be set as the "current" forecast. Scheduling of Current forecast should be only done by suitably authorised users, and follow a carefully defined scheduling plan. These users must have access to the admin interface tool (see Admin Interface manual).
The procedure for establishing a schedule current forecast is;
- Start an Operator Client. Select the workflow to be scheduled. Select the option "Scheduled Forecasting". Set the Start Time and End Time properties as required, set the repeat time and the ShiftT0.
- Submit the forecast to the Master Controller by clicking on run.
- Go to the Administrator Interface. Select the tab Forecast Tasks and the Scheduled Tasks item. The forecast run just scheduled should be available in the list.
- Click on Details. This will open a new web page with relevant details on the forecast run.
- Select "Download Properties". Save the XML file to a suitable location/name.
- Open the XML file. Change the attribute
- Save the XML file.
- Cancel the forecast just submitted.
- Return to the list of scheduled forecasts in the Admin Interface
- Select "Schedule new Forecast"
- Enter a relevant description (this will appear as a description of the run).
- Enter a tag if this forecast is to be enhanced (see next section)
- Select workflowId. This should be the same as the original forecast submitted.
- Specify Failover behaviour. This is only relevant when two master controllers are available running in Duty/Standby. If this workflow is to run on one Master Controller only, and should be replicated on the other then this item should be set to true. It should then not be scheduled on the other Master Controller. If it is set to False, then the run should be scheduled on both Master Controllers separately.
- Enter details on TaskDue time and TaskRepeat time
- Select the file to upload and use the browse button to load the XML file just defined.
- Select Submit.
- Confirm results in the Scheduled Forecasts list.
Setting up scheduled forecasts (Windows Stand Alone)
Some simpler forecasting systems use a single computer and a Windows Stand Alone client. It is also possible to schedule tasks for these systems.
- Add a folder to your trunk called "WindowsTaskScheduling"
- For each task you plan to schedule, you'll need to add a taskProperties file and a batch file to this folder. Examples of each of these files are given below. Test the batch file before commencing with step 3 (simply double clicking it). If the FEWS client is already open, then you should see some logging. If FEWS is not already open, it should open the SA client and log messages should appear, inidicating that the workflow ran. (This was tested and implemented in 2017.02. In 2017.01.1 it does not create a new task, but instead gives an error message regarding multiple Delft-FEWS instances.)
- Once the .bat file is working, schedule the task in Windows Task Scheduler:
- Open Windows Task Scheduler (Search for Task Scheduler in the start menu)
- Make a new folder under Task Scheduler Library to organize your FEWS tasks
- Click "Create Task..." in the right hand panel
- Give the task a logical name (e.g. same as Workflow)
- Select "Run whether user is logged on or not" (and do not store password)
- Under "Triggers," click "New..." and schedule the task (e.g. One time with "Start:" at the correct start time in the computer's time zone. Repeat task every 6 hours for a duration of: Indefinitely) Make sure the trigger is enabled!
- Under "Actions," click "New..." and select "Start a program" and browse to/open the correct batch file. Click "OK". Under "Start in (optional):" paste the path to the .bat file.
- No need to change anything in the Conditions or Settings.
- Click OK
Some additional comments:
- Workflows that don't contain a time tag (e.g. import modules with time in filestamp) will need a forecastLengthEstimator moduleinstance to set the T0 and forecast length.
- Be aware of the different time zones. Tasks should be scheduled in the computer time zone, but import modules are still run in the FEWS time zone, and scheduling should consider availability of data (e.g. 0, 6, 12, 18 GMT).
- The tasks should run regardless of whether the FEWS SA is open or closed. to be confirmed!
Example taskProperties file: TaskRun_Import_NOAAGFS.xml. Note: %TIME0%, below, will pass the current FEWS system time to the module instance.
Example batch file (corresponding to taskProperties file above): run_Import_NOAA_GFS.bat