How to add dates to a calendar and keep the previous dates ?

book

Article ID: 37251

calendar_today

Updated On:

Products

CA Workload Automation AE - Business Agents (AutoSys) CA Workload Automation AE - Scheduler (AutoSys) CA Workload Automation Agent

Issue/Introduction

Question:

How can we add new dates in a standard calendar in batch mode?

Environment:  

Workload Automation AE (Any Release )

Answer: 

A. The first method is to export your calendar in a file, add the new dates to the end of the file, and import the updated file.

 Steps :

       1.  Use the following command to export the calendar into a file :           

               autocal_asc –s calendar_name –E file_name

       2.  Edit the generated file and add the new dates at the end of the file

                   calendar: test2

                  description:

                 12/29/2016 00:00

                 12/30/2016 00:00

                 12/31/2016 00:00

 

       3. Then import the updated file  by using the command :

              autocal_asc –s calendar_name –I file_name -F

                           ( -F  Force overwrite calendars on import)

 

 B. The second method is to create a file to add the new dates in the standard calendar with the following syntax (without using the export and import commands) :

       1. Create a file with calendar name, letter "A" for "Add" followed by the NEW dates:

 

                 $ vi file.txt

                       calendar_name

                       A

                       Date

                       Date

                       Date

       2. Use the redirection syntax to add the dates :

                  $ autocal_asc < file.txt

                  For example:

                       holiday_2016

                       A

                       01/04/2016

                       02/04/2016

                       03/04/2016

                       04/04/2016 

Then run the autocal_asc command with the redirection operator to import the calednar

         autocal_asc < dates.txt

 

Environment

Release: ATSYHA99000-11.3.6-Workload Automation AE-High Availability Option
Component: