AutoSys Workload Automation

  • 1.  Can anyone explain why my extended calendar is missing a date?

    Posted Mar 15, 2018 06:44 AM

    I recently started using extended calendars and cycles to use in our job definitions. I have come across a situation that I just cannot work out why one date is missing and I am wondering if anyone can explain - it is driving me nuts.

     

    The objective  is to generate a list of dates for the "Saturday after last Friday each month from January to November".

    1. I have defined a cycle

    Cycle Name: Monthly_Jan02-Dec01
    Start Date  : 01/02/1972 00:00:00
    End Date    : 02/01/1972 00:00:00

    Start Date  : 02/02/1972 00:00:00
    End Date    : 03/01/1972 00:00:00

    Start Date  : 03/02/1972 00:00:00
    End Date    : 04/01/1972 00:00:00

    Start Date  : 04/02/1972 00:00:00
    End Date    : 05/01/1972 00:00:00

    Start Date  : 05/02/1972 00:00:00
    End Date    : 06/01/1972 00:00:00

    Start Date  : 06/02/1972 00:00:00
    End Date    : 07/01/1972 00:00:00

    Start Date  : 07/02/1972 00:00:00
    End Date    : 08/01/1972 00:00:00

    Start Date  : 08/02/1972 00:00:00
    End Date    : 09/01/1972 00:00:00

    Start Date  : 09/02/1972 00:00:00
    End Date    : 10/01/1972 00:00:00

    Start Date  : 10/02/1972 00:00:00
    End Date    : 11/01/1972 00:00:00

    Start Date  : 11/02/1972 00:00:00
    End Date    : 12/01/1972 00:00:00

     

    2. The extended calendar definition is;

    Name                : Monthly_LastFriPlus1_DoM_xDec
    Workdays            :
    Holiday Calendar    :
    Cycle Name          : Monthly_Jan02-Dec01
    Holiday Action      :
    Non Workday Action  :
    Date Adjustment     : 1
    Date Conditions     : CFRI#L

     

    3. The dates generated in the extended calendar;

    January              2018 February             2018 March                2018
    ------------------------- ------------------------- -------------------------
                                                        03/31/2018 00:00:00

    April                2018 May                  2018 June                 2018
    ------------------------- ------------------------- -------------------------
    04/28/2018 00:00:00                                 06/30/2018 00:00:00

    July                 2018 August               2018 September            2018
    ------------------------- ------------------------- -------------------------
    07/28/2018 00:00:00                                 09/01/2018 00:00:00
                                                        09/29/2018 00:00:00

    October              2018 November             2018 December             2018
    ------------------------- ------------------------- -------------------------
    10/27/2018 00:00:00                                 12/01/2018 00:00:00

     

    As you can see there isn't a date for May 2018, it should be 05/26/2018 00:00:00. I have gone over this umpteen times and I still cannot see why this date is missing,  all the other dates generated are correct, it simply does not make sense  to me.

     

    Can anyone offer an explanation or make a suggestion so that I get all the required dates?

     

    Thank you



  • 2.  Re: Can anyone explain why my extended calendar is missing a date?
    Best Answer

    Broadcom Employee
    Posted Mar 15, 2018 11:17 PM

    Yes...extended calendars can be real head scratchers at times. However, this may actually be a bug.

    In your cycle, the last Friday of the 05/02 - 06/01 period is 06/01 this year. Note that since you are using CFRI#L, you are saying the last Friday of a cycle period, not of a month. The +1 date adjustment is pushing the date selection for the 05/02-06/01 period beyond the end of the period. It appears this prevents it from being included in the calendar. I'm not sure it is supposed to do that. I will need to discuss that with development to confirm as the doc doesn't say.

     

    That being said, you really do not need to use a cycle to get what you are looking for. An extended calendar with nothing but a name, a date adjustment of +1, and a condition that includes the last Friday of every month (FRI#L) and excludes December (!(DEC)) seems to work...

     

    Name                : Monthly_LastFriPlus1_DoM_xDec
    Workdays            :
    Holiday Calendar    :
    Cycle Name          :
    Holiday Action      :
    Non Workday Action  :
    Date Adjustment     : 1
    Date Conditions     : FRI#L AND !(DEC)

     

                                 2018 (MM/DD/YYYY)
                                 -----------------

    January              2018 February             2018 March                2018
    ------------------------- ------------------------- -------------------------
                                                        03/31/2018 00:00:00

    April                2018 May                  2018 June                 2018
    ------------------------- ------------------------- -------------------------
    04/28/2018 00:00:00       05/26/2018 00:00:00       06/30/2018 00:00:00

    July                 2018 August               2018 September            2018
    ------------------------- ------------------------- -------------------------
    07/28/2018 00:00:00                                 09/01/2018 00:00:00
                                                        09/29/2018 00:00:00

    October              2018 November             2018 December             2018
    ------------------------- ------------------------- -------------------------
    10/27/2018 00:00:00                                 12/01/2018 00:00:00

                                 2019 (MM/DD/YYYY)
                                 -----------------

    January              2019 February             2019 March                2019
    ------------------------- ------------------------- -------------------------
    01/26/2019 00:00:00       02/23/2019 00:00:00



  • 3.  Re: Can anyone explain why my extended calendar is missing a date?

    Posted Mar 22, 2018 07:25 AM

    Thanks Scott,

     

    I believe you are correct, the key point is  "last Friday of a cycle period, not of a month", this was a misunderstanding on my part.

    Your solution to get the desired result not only worked well but it also help me understood how to make better use of AND and () in expressions, up to now I have only been using OR. The manual is lacking  any kind of examples in this regards.