Skip to main content

Class: CalendarSpec

schedule.v1.CalendarSpec

CalendarSpec describes an event specification relative to the calendar, similar to a traditional cron specification, but with labeled fields. Each field can be one of: : matches always x: matches when the field equals x x/y : matches when the field equals x+ny where n is an integer x-z: matches when the field is between x and z inclusive w,x,y,...: matches when the field is one of the listed values Each x, y, z, ... is either a decimal integer, or a month or day of week name or abbreviation (in the appropriate fields). A timestamp matches if all fields match. Note that fields have different default values, for convenience. Note that the special case that some cron implementations have for treating day_of_month and day_of_week as "or" instead of "and" when both are set is not implemented. day_of_week can accept 0 or 7 as Sunday CalendarSpec gets compiled into StructuredCalendarSpec, which is what will be returned if you describe the schedule.

Properties​

comment​

• comment: string

Free-form comment describing the intention of this spec.


dayOfMonth​

• dayOfMonth: string

Expression to match days of the month. Default: * (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: standard name of field --)


dayOfWeek​

• dayOfWeek: string

Expression to match days of the week. Default: *


hour​

• hour: string

Expression to match hours. Default: 0


minute​

• minute: string

Expression to match minutes. Default: 0


month​

• month: string

Expression to match months. Default: *


second​

• second: string

Expression to match seconds. Default: 0


year​

• year: string

Expression to match years. Default: *

Methods​

toJSON​

▸ toJSON(): Object

Converts this CalendarSpec to JSON.

Returns​

Object

JSON object


create​

▸ create(properties?): CalendarSpec & $Properties

Creates a new CalendarSpec instance using the specified properties.

Parameters​

NameTypeDescription
properties?$PropertiesProperties to set

Returns​

CalendarSpec & $Properties

CalendarSpec instance

▸ create(properties?): CalendarSpec

Parameters​

NameType
properties?$Properties

Returns​

CalendarSpec


decode​

▸ decode(reader, length?): CalendarSpec & $Properties

Decodes a CalendarSpec message from the specified reader or buffer.

Parameters​

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage length if known beforehand

Returns​

CalendarSpec & $Properties

CalendarSpec

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited​

▸ decodeDelimited(reader): CalendarSpec & $Properties

Decodes a CalendarSpec message from the specified reader or buffer, length delimited.

Parameters​

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns​

CalendarSpec & $Properties

CalendarSpec

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


encode​

▸ encode(message, writer?): Writer

Encodes the specified CalendarSpec message. Does not implicitly temporal.api.schedule.v1.CalendarSpec.verify|verify messages.

Parameters​

NameTypeDescription
message$PropertiesCalendarSpec message or plain object to encode
writer?WriterWriter to encode to

Returns​

Writer

Writer


encodeDelimited​

▸ encodeDelimited(message, writer?): Writer

Encodes the specified CalendarSpec message, length delimited. Does not implicitly temporal.api.schedule.v1.CalendarSpec.verify|verify messages.

Parameters​

NameTypeDescription
message$PropertiesCalendarSpec message or plain object to encode
writer?WriterWriter to encode to

Returns​

Writer

Writer


fromObject​

▸ fromObject(object): CalendarSpec

Creates a CalendarSpec message from a plain object. Also converts values to their respective internal types.

Parameters​

NameTypeDescription
objectObjectPlain object

Returns​

CalendarSpec

CalendarSpec


toObject​

▸ toObject(message, options?): Object

Creates a plain object from a CalendarSpec message. Also converts values to other types if specified.

Parameters​

NameTypeDescription
messageCalendarSpecCalendarSpec
options?IConversionOptionsConversion options

Returns​

Object

Plain object