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()
Call Signature
staticcreate(properties?):CalendarSpec&$Properties
Creates a new CalendarSpec instance using the specified properties.
Parameters
properties?
Properties to set
Returns
CalendarSpec & $Properties
CalendarSpec instance
Call Signature
staticcreate(properties?):CalendarSpec
Creates a new CalendarSpec instance using the specified properties.
Parameters
properties?
Properties to set
Returns
CalendarSpec
CalendarSpec instance
decode()
staticdecode(reader,length?):CalendarSpec&$Properties
Decodes a CalendarSpec message from the specified reader or buffer.
Parameters
reader
Uint8Array<ArrayBufferLike> | Reader
Reader or buffer to decode from
length?
number
Message 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()
staticdecodeDelimited(reader):CalendarSpec&$Properties
Decodes a CalendarSpec message from the specified reader or buffer, length delimited.
Parameters
reader
Uint8Array<ArrayBufferLike> | Reader
Reader 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()
staticencode(message,writer?):Writer
Encodes the specified CalendarSpec message. Does not implicitly temporal.api.schedule.v1.CalendarSpec.verify|verify messages.
Parameters
message
CalendarSpec message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
encodeDelimited()
staticencodeDelimited(message,writer?):Writer
Encodes the specified CalendarSpec message, length delimited. Does not implicitly temporal.api.schedule.v1.CalendarSpec.verify|verify messages.
Parameters
message
CalendarSpec message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
fromObject()
staticfromObject(object):CalendarSpec
Creates a CalendarSpec message from a plain object. Also converts values to their respective internal types.
Parameters
object
Plain object
Returns
CalendarSpec
CalendarSpec
toObject()
statictoObject(message,options?):object
Creates a plain object from a CalendarSpec message. Also converts values to other types if specified.
Parameters
message
CalendarSpec
CalendarSpec
options?
IConversionOptions
Conversion options
Returns
object
Plain object