A Common YANG Data Model for Scheduling
Extracted elements (30)
No 'default' or 'mandatory' substatements are defined in the groupings for frequency, interval, and workweek-start parameters because there are profiling cases where using these statements is problematic. Consuming modules are expected to refine these nodes as appropriate.
The document intentionally makes no assumption about the nature of actions triggered by schedules, and detection/resolution of schedule conflicts are explicitly out of scope. The module is a generic reusable library for scheduling, not a complete scheduling system.
The 'recurrence-utc' grouping is designed for machine readability (using uint32 seconds for duration), while 'recurrence-with-time-zone' promotes human readability (using the ISO 8601-style duration string type). Both are provided to accommodate different deployment requirements.
Section 5 maps DISMAN-SCHEDULE-MIB (RFC 3231) objects to the YANG module parameters. Several MIB objects are not supported (schedOwner, schedContextName, schedStorageType) and two (schedVariable, schedValue) are not applicable. This enables migration paths from SNMP-based scheduling to YANG-based management.
For the 'period-of-time' grouping, the 'period-start' MUST be no later than 'period-end'. The 'time-zone-identifier' MUST be specified if either period-start or period-end is in local time format, and MUST NOT be applied to UTC or time zone offset values.
In 'recurrence-utc-with-periods', the 'period-start' timeticks value MUST NOT exceed the value of the frequency instance (e.g., must be < 100 for secondly, < 6000 for minutely, < 360000 for hourly, < 8640000 for daily, etc.).
Schedules received with a starting time in the past SHOULD be ignored. An implementation MAY omit past occurrences and start immediately (for period-based schedules) or start from when the recurrence pattern is first satisfied from the current time (for recurrence-based schedules).
The combination of day, month, and year represented in date and time values MUST be valid per RFC 3339 Section 5.7 (maximum day number based on month and year).
The 'time-zone-identifier' parameter in generic-schedule-params MUST be specified if any date and time values are in local time format. It MUST NOT be applied to date and time values specified in UTC or time zone offset to UTC format.
Unless deployed in contexts where time synchronization is not subject to leap second adjustments, the second for date and time values SHOULD have the value '60' at the end of months in which a leap second occurs.
YANG modules using the 'recurrence-basic' grouping SHOULD refine the 'frequency' and 'interval' nodes with either a 'mandatory' or a 'default' statement if they always need to be configured or have default values.
Four schedule-state identities are defined: 'enabled', 'finished' (schedule has ended), 'disabled', 'out-of-date' (received out-of-date), and 'conflicted' (conflicts with other schedules). The identityref type allows future extensibility.
Seven frequency-type identities are defined corresponding to iCalendar FREQ values: secondly, minutely, hourly, daily, weekly, monthly, and yearly. These characterize the repeating interval rule of a recurrence schedule.
The 'duration' typedef encodes time durations as a string matching the pattern for weeks (PnW), days (PnD), and hours:minutes:seconds (THH:MM:SS). It explicitly does not support 'Y' (years) or 'M' (months) designators. Negative durations are permitted for alarm triggers before an associated time.
The 'generic-schedule-params' grouping provides system-wide scheduling guard parameters: description, time-zone-identifier, validity (latest time a schedule can start), max-allowed-start, min-allowed-start, max-allowed-end, and discard-action. These apply to all schedules on a system to prevent stale configuration.
The 'icalendar-recurrence' grouping extends recurrence-time-zone-with-periods with iCalendar-compatible filter components: bysecond, byminute, byhour, byday (with direction for monthly/yearly nth-occurrence), bymonthday, byyearday, byyearweek, byyearmonth, bysetpos, workweek-start, and exception-dates. The final recurrence set excludes dates listed in exception-dates.
The 'ietf-schedule' YANG module defines reusable groupings for scheduling purposes including generic-schedule-params, period-of-time, recurrence-basic, recurrence-utc, recurrence-with-time-zone, recurrence-utc-with-periods, recurrence-time-zone-with-periods, icalendar-recurrence, and schedule-status variants. It is designed to be imported and reused by other YANG modules rather than deployed standalone.
The 'period-of-time' grouping represents a time period using either (start, end) or (start, duration) format. If neither period-end nor duration is specified, the period lasts forever. A duration of 0 or period-end equal to period-start creates a one-shot schedule.
The 'recurrence-basic' grouping specifies a simple recurrence rule starting immediately and repeating forever, with 'frequency' (identityref to frequency-type) and 'interval' (uint32) parameters. No default or mandatory substatements are defined; importing modules SHOULD refine these nodes.
The 'recurrence-time-zone-with-periods' grouping extends recurrence-with-time-zone with a 'period' list (using the period-of-time grouping) to define an aggregate set of repeating occurrences with local time and time zone. Duplicate instances are ignored.
The 'recurrence-utc' grouping extends recurrence-basic with a 'recurrence-first' container (start-time-utc in UTC, duration in seconds) and a 'recurrence-end' choice (until via utc-until, or count). The count value MUST be greater than 1; start-time-utc counts as the first occurrence.
The 'recurrence-utc-with-periods' grouping extends recurrence-utc with a 'period-timeticks' list (keyed by period-start of type yang:timeticks) to define an aggregate set of repeating occurrences. The recurrence set is the union of the recurrence rule and period-timeticks; duplicates are ignored.
The 'recurrence-with-time-zone' grouping is structurally similar to recurrence-utc but uses a duration type (ISO 8601-like string) instead of uint32 seconds for duration, and includes a time-zone-identifier. It is designed for human readability rather than machine readability.
The 'schedule-status' grouping exposes scheduling operational state: state (identityref), version (uint16), schedule-type, local-time (read-only), last-update (read-only), and for recurrence schedules: counter, last-occurrence, upcoming-occurrence, last-failed-occurrence, and failure-counter (all read-only).
Three schedule-status variants are defined: 'schedule-status' (base), 'schedule-status-with-time-zone' (adds read-only time-zone-identifier and schedule-name), and 'schedule-status-with-name' (adds schedule-name). These variants support better modularity across different scheduling contexts.
Two YANG features are defined: 'basic-recurrence' (server supports basic scheduled recurrence) and 'icalendar-recurrence' (server supports comprehensive iCalendar-based recurrence per RFC 5545 Sections 3.3.10 and 3.8.5). Implementations may support one or both depending on the scheduling context.
This document registers the URI 'urn:ietf:params:xml:ns:yang:ietf-schedule' in the IETF XML Registry (RFC 3688) as an XML namespace.
This document registers the YANG module 'ietf-schedule' (prefix: schedule, namespace: urn:ietf:params:xml:ns:yang:ietf-schedule, not IANA-maintained) in the YANG Module Names registry (RFC 6020).
The ietf-schedule module itself exposes no writable data nodes, read-only state nodes, or RPCs, so it introduces no direct security issues. However, modules reusing its groupings must identify their own security considerations, particularly regarding time synchronization accuracy, recurring events masking abnormal behavior, absent audit logs, and high-frequency schedules as a denial-of-service vector.
YANG-based management protocols accessing the ietf-schedule module (NETCONF, RESTCONF) must use a secure transport layer (SSH, TLS, QUIC) and mutual authentication. NACM (RFC 8341) provides access control to restrict users to preconfigured subsets of operations.