search cancel

CALE_LOOK_AHEAD does not work for monthly Jobs

book

Article ID: 230360

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

Calculating the next execution of a workflow with CALE_LOOK_AHEAD does not display all results, in case the workflow executes the last day of the month or sometime in more than 14 days since the Start date.

For example, if we consider this Schedule Object, with a Workflow that executes the last day of the month:

And we launch a Script to calculate the next launch of the Workflow in position 1 of this schedule with a script like this:

: SET &DATE# = CALE_LOOK_AHEAD('20210101', 'AFR_REPRO_CALE_LOOK_AHEAD', '1')
: print "Schedule  'AFR_REPRO_CALE_LOOK_AHEAD - Calculation from 20210101 - Position 1  - Next execution on &DATE#"

The result would be incorrect, the execution for the 31th of the Month would not be displayed:

2021-12-13 12:29:47 - U00020408 Schedule  'AFR_REPRO_CALE_LOOK_AHEAD - Calculation from 20210101 - Position 1  - Next execution on

Environment

Release : 12.x

Component : AUTOMATION ENGINE

Function: CALE_LOOK_AHEAD_MAX

Cause

Default value of the variable CALE_LOOK_AHEAD_MAX is 14 days, this is why if the Workflow executes in more than 14 days its next schedule will not be displayed when doing CALE_LOOK_AHEAD.

Resolution

If you want to consider Workflows executing in more than 14 days from the first date taken as reference, please set by the variable CALE_LOOK_AHEAD_MAX to a higher value such as 30 days in UC_CLIENT_SETTINGS:

After that, relaunch the Script and the result will be ok:

2021-12-13 12:37:28 - U00020408 Schedule  'AFR_REPRO_CALE_LOOK_AHEAD - Calculation from 20210101 - Position 1  - Next execution on 20210131

Attachments