Use the FORECAST_TASK script function to create a forecast for an active task. FORECAST_TASK performs the same function as the task forecast that you can open in the context menu in the Process Monitoring perspective. The forecast shows the expected runtime of a particular running task.

More information:

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: FORECAST_TASK only creates forecasts for active tasks. Use FORECAST_OBJECT to create forecasts for other objects.


FORECAST_TASK (RUN#, Title [,Registrations] [,Group_ERT] [,Days])


    Creates a forecast for an active task

  • RUN#
    RunID of the activated object

  • Title
    Name of the forecast

  • Registrations
    (Optional) Determines whether registrations for groups are considered
    Allowed values: Y or N (default)

  • Group_ERT
    (When Registrations is set to N) Expected runtime for groups
    Allowed values:

    • 0
      The ERT of the group is used (default)
    • 1 - 7199
      Fixed value in seconds

  • Days
    Maximum number of future days to use for the calculation
    Format: number without quotation marks, script literal, or script variable
    Default: 1

Return Codes

  • 0
    The forecast was created successfully
  • 20463
    Object RunID or name was not found


The following line creates a forecast for a file transfer.


The following example creates a forecast for a Job that runs in a group. Instead of using the ERT of the group, the function applies a fixed value of 60 seconds.


See also: