FORECAST_TASK

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.

Syntax

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

Parameters

Return Codes

Examples

The following line creates a forecast for a file transfer.

:SET &RUNNR# = GET_UC_OBJECT_NR ("C70.WINDOWS")
:
SET &RET# = FORECAST_TASK(&RUNNR#,"ETA_FT_C70.WINDOWS")

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.

:SET &RUNNR# = GET_UC_OBJECT_NR ("T91.SALDO.03")
:
SET &RET# = FORECAST_TASK(&RUNNR#,"ETA_T91.SALDO.03","N",60)

See also:

seealso

Autoforecast

Script Elements for Handling Objects