AutoSys Workload Automation

 View Only

 Create an extended calendar

Frederic Bastiani's profile image
Frederic Bastiani posted Nov 20, 2023 03:57 AM

Hi,

I need to create an extended calendar with one sunday every two weeks.

Do you have a solution to create it please?

I didn't find the solution with playing with conditions ;-).

Best regards.

Venkateshwar Goud Badrigari's profile image
Broadcom Employee Venkateshwar Goud Badrigari

Frederic,

This is a tricky requirement if you just use Sun#1 and Sun#3 may not work all the time as sun#5 may be a Sunday as well.  You need alternate Sundays in your extended calendar.  You can solve this using the Cycle calendar as shown below:

Enter Cycle Name: Year_Cycle
Description : Cycle containing the Year Dates
Start Date  : 01/01/2023 00:00:00
End Date    : 12/31/2023 00:00:00
 
Start Date  : 01/08/2024 00:00:00
End Date    : 12/29/2024 00:00:00

Note, for the Year 2024 I started the cycle on 01/08/2024 since 12/31/2023 is a Sunday and I want to avoid the first Sunday of 2024.  If the last Sunday of December is not sun#5, then we can start from 01/01/20xx.  You can add periods every year with the same logic.

Then create the Extended calendar as below:

Enter Calendar Name: Alternate_Sundays
Name                : Alternate_Sundays
Description         : Calendar for alternate sundays
Workdays            : sa
Holiday Calendar    :
Cycle Name          : Year_Cycle
Holiday Action      :
Non Workday Action  :
Date Adjustment     : 0
Date Conditions     : CWEEK#O & sun

I generated the dates starting today and got below results:

                             2023 (MM/DD/YYYY)
                             -----------------
 
January              2023 February             2023 March                2023
------------------------- ------------------------- -------------------------
 
April                2023 May                  2023 June                 2023
------------------------- ------------------------- -------------------------
 
July                 2023 August               2023 September            2023
------------------------- ------------------------- -------------------------
 
October              2023 November             2023 December             2023
------------------------- ------------------------- -------------------------
                          11/19/2023 00:00:00       12/03/2023 00:00:00
                                                    12/17/2023 00:00:00
                                                    12/31/2023 00:00:00
 
                             2024 (MM/DD/YYYY)
                             -----------------
 
January              2024 February             2024 March                2024
------------------------- ------------------------- -------------------------
01/14/2024 00:00:00       02/11/2024 00:00:00       03/10/2024 00:00:00
01/28/2024 00:00:00       02/25/2024 00:00:00       03/24/2024 00:00:00
 
April                2024 May                  2024 June                 2024
------------------------- ------------------------- -------------------------
04/07/2024 00:00:00       05/05/2024 00:00:00       06/02/2024 00:00:00
04/21/2024 00:00:00       05/19/2024 00:00:00       06/16/2024 00:00:00
                                                    06/30/2024 00:00:00
 
July                 2024 August               2024 September            2024
------------------------- ------------------------- -------------------------
07/14/2024 00:00:00       08/11/2024 00:00:00       09/08/2024 00:00:00
07/28/2024 00:00:00       08/25/2024 00:00:00       09/22/2024 00:00:00
 
October              2024 November             2024 December             2024
------------------------- ------------------------- -------------------------
10/06/2024 00:00:00       11/03/2024 00:00:00       12/01/2024 00:00:00
10/20/2024 00:00:00       11/17/2024 00:00:00       12/15/2024 00:00:00
                                                    12/29/2024 00:00:00

Remember to add the next period for the Year_Cycle in the last week of 2024 and your year calendar will be auto-generated.

Regards,

Venkat.