FORECAST_OBJECT
Use the FORECAST_OBJECT script function to generate a forecast for an object. You can generate a forecast of the expected runtime any executable object. This script function generates the same type of object forecast as you can manually generate through the context menu in the Automic Web Interface.
Note: The script function causes all open transactions of the script to be written to the AE database. For more information, see Script Processing.
Tip: Use the FORECAST_TASKscript function to create forecasts of running tasks.
Syntax
FORECAST_OBJECT (Object Name, Title, [Date Format:]Date, [Time Format;]Start Time [,Registrations] [,Group_ERT])
Parameters
-
Object Name
Name of the object
Format: script literal or script variable -
Title
Name of the forecast in uppercase letters without blanks
Format: script literal or script variable
Important! Use a name that is not already in use. -
Date Format
(Optional) Date format for the start date for the forecast
Format: YYMMDD or YYYYMMDD
For more information about date formats, see Date, Time and Period Formats in Scripts. -
Date
Logical start date in YYMMDD or YYYYMMDD format
Format: script literal or script variable -
Time Format
(Optional) Time format for the start time for the forecast
Format: HHMMSS
For more information about time formats, see Date, Time and Period Formats in Scripts. -
Time
Start time of the task in HHMMSS format
Format: script literal or script variable -
Registrations
(Optional) Considers or ignores registrations for groups of tasks
Format: script literal or script variable
Allowed values:- Y
Considers registrations - N (default)
Ignores registrations
- Y
-
Group_ERT
Expected runtime (ERT) for groups
Note: this parameter only applies when Registrations is set to N.
Allowed values:- 0
Uses ERT of the group (default value) - 1 to 7199
Fixed value in seconds
- 0
Note: If you specify a date or time format, include a separator (: or ;) between the date format and date, and time format and time.
Return Code
The FORECAST_OBJECT function returns a 16-digit number with leading zeros. The function returns the value 0000000000000000 after a successful forecast creation.
Examples
The following script creates a forecast for a file transfer, and specifies date and time formats.
:SET &RET# = FORECAST_OBJECT("C70.WINDOWS","FORECAST_FT_C70.WINDOWS","MM/DD/YY:11/03/03","HH:MM;12:30")
The following example creates a forecast for a Job running in a group. Instead of using the ERT of this group, the forecast uses a fixed value of 60 seconds.
:SET &RET# = FORECAST_OBJECT("T91.REM.03","FORECAST_T91.REM.03","MM/DD/YY:11/07/03","200000","Y",60)
See also: