6.13 Calendar

Calendar definitions and definition examples are shown below. For details on Calendar, see “Calendar management functions” and “Schedule management”.

(Table) Calendar definitions

Label Default value Required* Description
apiVersion: Yes API version
Specify 1.0.
kind: Yes Specify "calendar".
type: Yes Specify "resource".
It indicates a new definition to be added to the operational function of Ops I.
name: Yes Internal name of the Calendar definition.
"name" should follow the conventions shown below:
  • Specify the directory name of this YAML file.
  • The following characters can be entered:
    • Single-byte alphanumeric characters:
      a–z A–Z 0–9
    • Single-byte special characters:
      _ -
  • The first character must be a single-byte alphanumeric character or an underscore (_).
  • For other precautions, see "Notes on creating YAML files" 2–4.
label: Yes Display name of the operational function to be written in the YAML file
includes: No List the related YAML files for use in this YAML file.
TipsTips
  • Before this YAML file is registered, the YAML file to be written to must be registered in Ops I.
  • By specifying the "includes" label, you can import information defined in another YAML file.
- kind: Yes Type of YAML file to be loaded
  name: Yes Internal name of YAML file to be loaded
description: No Detailed description of this YAML file.
workItems: No Work item definition
- (workItem):
  name: Yes Name of work item.
Can be 1 to 40 characters in length.
  description: No Detailed description of the work item
  isFolder: Yes The following can be specified.
  • true: The work item is a folder
  • false: The work item is not a folder, so "scheduleRule" must be defined.
  scheduleRule: Required when "isFolder" is false Schedule to be set as a work item
appointment: Yes Scheduled work item
start: Yes Start time of the work item
dateTime: Yes Specify in a "hh:MM:ss" format. Specify 00 for "ss".
timeZone: Yes Time zone of the start time
duration: Yes Time (minutes) required for the work item. Specify an integer between 1 and 2,147,483,647.
The maximum value varies depending on the type of pattern. Specify a value less than or equal to the value specified in the pattern interval (unit is converted to minutes).
pattern: Required when "isFolder" is false Work item repetition patterns
For details, see "(Table) Work item repetition patterns".
type: oneTime Yes Work item repetition types
Selectable values: daily, weekly, monthly, yearly, oneTime
If oneTime is specified, it is a single work task. If any other type is specified, it is a periodic work task.
useDayOfMonth: See "(Table) Work item repetition patterns" Specify whether a work item schedule should be based on dates.
  • true: Based on dates (Absolute)
  • false: Not based on dates (Relative)
interval: Interval between implementing a work item
Units and selectable values vary depending on the type.
  • daily: 1 to 365 days
  • weekly: 1 to 52 weeks
  • monthly: 1 to 12 months
  • yearly: 1 to 99 years
plannedDayOfWeek: Day of the week on which to implement the work item
Selectable values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
plannedDayOfMonth: Date on which to implement the work item
plannedDay: Days from the standard implementation of the work item
Selectable characters: Integer between 1 and 31
isFromEnd: false The following can be specified as the standard.
  • true: Last day of the month
  • false: First day of the month
Example: Specify "true" when counting "X days before the last day of the month".
plannedWeekOfMonth: Week during which to implement the work item
Selectable values: 1, 2, 3, 4, 5, -1
"-1" indicates the last week.
plannedMonthOfYear: Month in which to implement the work item
Selectable values: Integers from 1 to 12
  children: No Can be used when isFolder is specified as "true".
Define work items under the folder.
- (workItem): Defines the work item.
*If a label that is not nested has its "Required" field set to "No", the definition is not required. For nested labels, the "Required" setting of a lower-level label applies only when the "Required" setting of its upper-level label is set to "Yes".

Details of the implementation pattern of each work schedule is shown below.
Each column of the table has a rule, and combinations of “type” and “useDayOfMonth” values specify a repeating pattern.

(Table) Work item repetition patterns

pattern*1 One time daily weekly Absolute month Relative month Absolute year Relative year
type: oneTime daily weekly monthly monthly yearly yearly
useDayOfMonth: × × × true false true false
interval: ×
plannedDayOfWeek: × × *2 × ×
plannedDayOfMonth: × × × × ×
plannedDay: × × × × ×
isFromEnd: × × × × × ×
plannedWeekOfMonth: × × × × ×
plannedMonthOfYear: × × × × ×
(Legend) ◯: Required item, △: Optional item (the default value of "false" is selected if not specified), ×: Cannot be specified
*1: For details of repeating patterns, see "Schedule management"
*2: More than one can be specified.

<Definition example>

apiVersion: 1.0
kind: calendar
type: resource
name: Template type_weekly1
label: test calendar template pattern type type_weekly1
description: test_calendar template description
workItems:
  - name: workItem_plannedDayOfWeek_multi_update
    description: workItem_plannedDayOfWeek_multi description
    isFolder: false
    scheduleRule:
        appointment:
            start:
                dateTime: "16:00:00"
                timeZone: "UTC+09:00_1"
            duration: 60
        pattern:
            type: weekly
            interval: 2
            plannedDayOfWeek: ["Friday"]