Script Function: Creates a forecastEstimates a task's runtime on the basis of previous executions. for a specified active taskAn executable object that is running. Tasks are also referred to as activities..
FORECAST_TASK(RunID,Title, [Registrations], [Group_ERT], [Days])
Syntax |
Description/Format |
---|---|
Run number (RunID) of the activated objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task. |
|
Title |
Name of the forecast. |
Registrations |
Setting whether registrations (for groups) should be considered or not. Allowed values: "Y", "N" (default value) |
Group_ERT |
Expected runtimeThe duration of a task's execution. It refers to the period between a task's start and end. It does not include its activation period (see also: activation and start). (ERT) for Froups. It is used when Registrations is set to 'N'. Allowed values: |
Days |
Maximum number of days in the future that should be used for the calculation. Default value: "1" |
Return codes |
---|
"0" - Forecast was successfully created |
A forecast can be created that shows the expected runtime of any running task. You can create it manually in the UserInterfaceThis is the Automation Engine's graphical user interface. [Formerly called the "Rich Client", "RichGUI" and "Dialog Client."] by calling the command of the same name in the Activity Window's context menu. Define your criteria and a forecast will be created for the task you selected. Alternately, you can use the corresponding script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,….
The procedure for using the script function is similar to using it manually. Define a forecast name (use capital letters and no blanks). If required, the parameters Registrations and Group_ERT may be set for tasks that belong to a group. Note that the forecast name must not yet exist.
Use the script element FORECAST_OBJECT to create forecasts for objects.
This script statement has the effect that all open script transactions are written to the AE databaseA database is an organized collection of data including relevant data structures..
FORECAST_TASK only works for active tasks.
The following line creates a forecast for a file transferTransfers files from one computer to another. A particular Automation Engine object type (FileTransfer object)..
:SET &RUNNR# = GET_UC_OBJECT_NR ("C70.WINDOWS")
:SET &RET# = FORECAST_TASK(&RUNNR#,"PROGNOSE_FT_C70.WINDOWS")
The second example creates a forecast for a jobAn Automation Engine object type for a process that runs on a target system. that runs in a group. Instead of using the group's ERT, a fixed value of 60 seconds should be applied.
:SET &RUNNR# = GET_UC_OBJECT_NR ("T91.SALDO.03")
:SET &RET# = FORECAST_TASK(&RUNNR#,"PROGNOSE_T91.SALDO.03","N",60)
See also:
Script element | Description |
---|---|
Calculates forecast data for future activitiesDeployment-related activities. |
|
Generates a forecast for the specified object. |
Script Elements - Activate Objects
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by Function
Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support |
Copyright © 2016 Automic Software GmbH |