Automation Engine Script Guide > Ordered by Function > Activate Objects > FORECAST_OBJECT

FORECAST_OBJECT

Script Function: Generates a forecastEstimates a task's runtime on the basis of previous executions. for the specified objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task

Syntax

FORECAST_OBJECT(Object Name, Title, Date, Start Time, [Registrations], [Group_ERT])

Syntax

Description/Format

Object Name

Name of the object
Format: script literal or script variable

Title

Name of the forecast
Format: scriptA particular Automation Engine object type. literal or script variableA placeholder for a value within a script.

Date Format

Format guidelines for the date
Default value: "YYMMDD" and "YYYYMMDD"

: or ;

Separator between Date Format and Date.

Date

Logical start date in the Format "YYMMDD" or "YYYYMMDD"

Format: script literalor script variable

You can also specify a different date format. Do so by entering the required date format, followed by a separator (: or ;) and then specifying the date. Date Format is an optional parameter.

Start Time

Start Time of the taskAn executable object that is running. Tasks are also referred to as activities. in the format "HHMMSS"

Format: script literalor script variable 

You can also specify a different time format. Do so by entering the required time format, followed by a separator (;) and then specifying the time. The time format is an optional parameter.

Registrations

Setting whether registrations  (for groups) should be considered or not.
Format: script literal or script variable

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 groups. It is used when Registrations is set to 'N'.

Allowed values:
"0" - ERT of the groupAn Automation Engine object type that integrates tasks so that they can be processed together. is used (default value)
"1" to "7199" - fixed value in seconds


Return code

"0" - The forecast was successfully created

Comments

A forecast can be created for the expected runtime of any executable object. 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."] using the corresponding command in the Explorer's context menu. Specify your criteria and a forecast will be created for the particular object. Alternatively, 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,….

With the script function, the procedure is almost the same. Define a forecast name (in capital letters and without blanks), start date and time. For date and time, you can define any format of your choice. If required, you can set the parameters Registrations and Group_ERT for tasks belonging to a group. Please note that the forecast name must not yet exist!

The return codeThe value that represents the result of tasks and script functions. of this function is a 16-digit number with leading zeros. The value "0000000000000000" is returned after a successful forecast creation.

Use the script element FORECAST_TASK to create forecasts of running tasks.

This script statement causes all open transactions of the script to be written to the AE databaseA database is an organized collection of data including relevant data structures..

Examples

The following line creates a forecast for a file transferTransfers files from one computer to another. A particular Automation Engine object type (FileTransfer object)., thereby considering 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 second example creates a forecast for a jobAn Automation Engine object type for a process that runs on a target system. running in a group. Instead of using the ERT of this group, a fixed value of 60 second should be applied.

:SET &RET# = FORECAST_OBJECT("T91.REM.03","FORECAST_T91.REM.03","MM/DD/YY:11.07/03","200000","Y",60)

 

See also:

Script element Description

AUTOFORECAST

Calculates forecast data for future activitiesDeployment-related activities

FORECAST_TASK

Creates a forecast for a specified task

Script Elements - Activate Objects

Forecast
Runtime Evaluation

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