Calendars
9.0.20.025 A calendar is a set of scheduling criteria that you can apply to multiple jobs, instead of having to define scheduling criteria in each individual job.
The following sections provide details about the available types of calendars that you can define and the parameters that you use in calendar definitions
Calendar:Regular
The following example shows how to define a regular calendar. Such calendars are based on certain dates (the days of the month and/or the days of the week) in a selected year.
"RegularCalendar": {
"Type" : "Calendar:Regular",
"Description" : "My regular calendar",
"Server" : "serverName",
"Alias" : "ZOS_NAME",
"When": {
"Years": [{
"Year": "2020",
"JAN" : ["10-15","22","24"],
"APR" : ["1","12-22"]
},{
"Year": "2021",
"FEB" : ["5-10","22","24"],
"APR" : ["4","12-18"],
"JUN" : ["2"]
}]
}
}
}
This example contains the following parameters and objects for the regular calendar:
Parameter | Description |
---|---|
Description | (Optional) A textual description for the calendar |
Server | Name of Control-M/Server, or Global (for ALL servers, the default) |
Alias | Calendar name for z/OS jobs |
When | Scheduling definitions for when to run jobs. Definitions are grouped by year under the Years object. Each year has the following parameters:
|
Calendar:Periodic
Periodic calendars are used to divide the year into a combination of working periods that you define (for example, 13 periods of varying lengths instead of 12 months). The following example shows how to define a periodic calendar.
"PeriodCalendar": {
"Type": "Calendar:Periodic",
"Description": "My periodic calendar",
"Server": "serverName",
"Alias" : "ZOS_NAME",
"When": {
"Periods": [{
"Period": "A",
"Years": [{
"Year": "2020",
"JAN": ["2", "5-7"],
"FEB": ["3", "6-8"]
},{
"Year": "2021",
"JAN" : ["4","7-9"],
"APR" : ["5","8-10"]
}]
},{
"Period": "B",
"Years": [{
"Year": "2020",
"JAN": ["3", "8-10"],
"MAR": ["3", "6-8"]
},{
"Year": "2021",
"JAN" : ["4","7-9"],
"MAY" : ["5","8-10"]
}]
},{
"Period": "All",
"Years": [{
"Year": "2020",
"JAN" : ["20-21","31"]
},{
"Year": "2021",
"JAN" : ["19-20","30"]
}]
}]
}
}
}
This example contains the following parameters and objects for the periodic calendar:
Parameter | Description |
---|---|
Description | (Optional) A textual description for the calendar |
Server | Name of Control-M/Server, or Global (for ALL servers, the default) |
Alias | Calendar name for z/OS jobs |
When | Scheduling definitions for when to run jobs. Definitions are grouped by period under the Periods object. Each period is identified by its Period parameter, a one-letter period ID. Valid values are from A to Z, excluding N and Y. Further definitions of a period are grouped by year under the Years object. Each year has the following parameters:
Note that scheduled dates must not overlap between periods. |
Calendar:RuleBasedCalendar
The following example shows how to define a rule-based calendar (RBC). Such calendars are based on flexible rules that you define, independent of specific years or specific months.
"RuleBasedCalendar": {
"Type": "Calendar:RuleBasedCalendar",
"Server": "serverName",
"Alias" : "ZOS_NAME",
"When": {
"Schedule": "Everyday",
"MonthDays":["1","+2","-3",">4","<5","D6","L7"],
"MonthDaysCalendar": "Summer2020",
"Months": ["JAN", "OCT", "DEC"],
"WeekDays" : ["SUN","+MON","-TUE",">WED","<THU"],
"WeekDaysCalendar" : "Summer2020",
"DaysRelation" : "OR",
"StartDate":"20200322",
"EndDate":"20200325",
"ActivePeriod" :false,
"DaysKeepActive": "0",
"ConfirmationCalendars": {
"Calendar": "Holidays",
"ExceptionPolicy": "OrderOnNextConfirmedDay",
"ShiftBy": "1"
}
}
}
}
This example contains the following parameters and objects for the RBC:
Parameter | Description |
---|---|
Description | (Optional) A textual description for the calendar |
Server | Name of Control-M/Server, or Global (for ALL servers, the default) |
Alias | Calendar name for z/OS jobs |
When | Scheduling parameters that set the rules for when to run jobs. See next table. |
Under the When object, you can set combinations of the following properties:
Property | Description |
---|---|
Schedule | One of the following options:
|
MonthDays | One or more days in the range of 1 to 31 For all days of the month, use "ALL" (the default value). If you combine the MonthDays property with the MonthDaysCalendar property, you can create advanced rules, using the following syntax:
|
MonthDaysCalendar | The name of a previously defined calendar from which to derive the days of the month |
Months | One or more of the following: "JAN", "FEB", "MAR", "APR","MAY","JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC" For all months of the year, use "ALL" (the default value). |
WeekDays | One or more of the following: "SUN","MON","TUE","WED","THU","FRI","SAT" For all days of the week, use "ALL" (the default value). In addition, you can specify a specific day in a specific week of the month using a value with the following format: DdayWn If you combine the WeekDays property with the WeekDaysCalendar property, you can create advanced rules, using the following syntax:
|
WeekDaysCalendar | The name of a previously defined calendar from which to derive the days of the week |
DaysRelation | The logical relationship between MonthDays and WeekDays:
|
SpecificDates | Specific dates for running jobs. For each date, use the format "MM/DD" (enclosed in quotes). Separate multiple dates with commas. Note: The SpecificDates option cannot be used in combination with options WeekDays, Months, or MonthDays. |
StartDate | Start date, in YYYYMMDD format, for a period when the job can/cannot run. Used with EndDate. |
EndDate | End date, in YYYYMMDD format, for a period when the job can/cannot run. Used with StartDate. |
ActivePeriod | Whether the defined period (as defined by StartDate and EndDate) is a period of activity or inactivity, with the following values:
|
DaysKeepActive | The number of days to keep jobs that did not run at the scheduled date. Valid values are 0-99. A value of 0 means jobs are not kept at all, and a value of 99 means Forever. |
ConfirmationCalendars | Details of a Confirmation calendar to use for validation of scheduling dates, including an indication of how to handle jobs that are scheduled for a non-working day in this calendar. |
Calendar | The name of the predefined Confirmation calendar, in which work days are indicated |
ExceptionPolicy | A policy to follow when a job is scheduled on a non-working day. Choose from one of the following options:
|
ShiftBy | The number of additional confirmed days to move the job, beyond the action specified by the exception policy. Specify one of the following:
The default value is 0. |