multiple run calendars in autosys

5.3k Views Asked by At

Is it possible to use multiple run calendars for one job in AutoSys r11.3 ? For example I have calendars: cal_1 for 2nd working day of the month and cal_2 for 3rd working day of the month. Now I have a job that needs to run on both second and third business day of the month. Is it possible to club both the calendars, not having to create a new calendar just for this job.

2

There are 2 best solutions below

0
On

You need not to prepare two calendars just to get the two working days of a month. Instead prepare the dates of a calendar for all the months which you wanted to run by excluding the non-working days (Saturday & Sunday) and holidays.

Now you can create a standard calendar and can give the exact working dates which you get after excluding the non working days and holidays as shown below.

Now I am going to add an ad-hoc date using the standard calendar.

C:\Program Files (x86)\CA\Workload Automation `AE\autosys>autocal_asc`

CA WAAE Calendar Utility


Please select from the following options:
[1] Administer Standard Calendar.
[2] Administer Extended Calendar.
[3] Administer Cycle.
[4] List all Calendars.
[5] List all Cycles.
[0] Exit CA WAAE Calendar Utility.
>  1

Administer Standard Calendar


Please select from the following options:
[1] Create a Calendar.
[2] Add dates to Calendar.
[3] Delete Calendar dates.
[4] Delete an entire Calendar.
[5] List dates for a Calendar.
[6] List all Standard Calendars.
[9] Exit from "Administer Standard Calendar" menu.
[0] Exit CA WAAE Calendar Utility.
> 1

Calendar Name: adhoc-days

Date (MM/DD/YYYY [HH:MM]): 01/02/2017

Date (MM/DD/YYYY [HH:MM]): 01/03/2017

Date (MM/DD/YYYY [HH:MM]): 02/02/2017

Date (MM/DD/YYYY [HH:MM]): 02/03/2017
CAUAJM_I_50430 Insert Successful for Calendar: adhoc-days
0
On

I don't think so there is a utility to combine two calendars explicitly. However, the calendars are nothing but set of dates as defined/specified. Just get the days from both the calendars and club them; and then use them to add a new composite calendar which has both set of dates.

My idea would be to use CLI utility autocal_asc to get all the dates from both the calendars and append to a file(only the dates; grep if you need to or a similar processing). Once you have the file ready use to autocal_asc once again to create the composite calendar with the dates.

Or you can just add the dates from one to another in a very similar way.