Class: 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
| Name | Type | Description |
|---|---|---|
properties? | $Properties | Properties to set |
Returns
CalendarSpec instance
▸ create(properties?): CalendarSpec
Parameters
| Name | Type |
|---|---|
properties? | $Properties |
Returns
decode
▸ decode(reader, length?): CalendarSpec & $Properties
Decodes a CalendarSpec message from the specified reader or buffer.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
length? | number | Message length if known beforehand |
Returns
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
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
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
| Name | Type | Description |
|---|---|---|
message | $Properties | CalendarSpec message or plain object to encode |
writer? | Writer | Writer 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
| Name | Type | Description |
|---|---|---|
message | $Properties | CalendarSpec message or plain object to encode |
writer? | Writer | Writer 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
| Name | Type | Description |
|---|---|---|
object | Object | Plain object |
Returns
CalendarSpec
toObject
▸ toObject(message, options?): Object
Creates a plain object from a CalendarSpec message. Also converts values to other types if specified.
Parameters
| Name | Type | Description |
|---|---|---|
message | CalendarSpec | CalendarSpec |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object