class Temporalio::Client::Schedule::Spec::Calendar
@return [String, nil] Description of this schedule.
@!attribute comment
@return [Array<Range>] Day of week range to match, 0-6, 0 is Sunday. Default matches all days.
@!attribute day_of_week
@return [Array<Range>] Optional year range to match. Default of empty matches all years.
@!attribute year
@return [Array<Range>] Month range to match, 1-12. Default matches all months.
@!attribute month
@return [Array<Range>] Day of month range to match, 1-31. Default matches all days.
@!attribute day_of_month
@return [Array<Range>] Hour range to match, 0-23. Default matches 0.
@!attribute hour
@return [Array<Range>] Minute range to match, 0-59. Default matches 0.
@!attribute minute
@return [Array<Range>] Second range to match, 0-59. Default matches 0.
@!attribute second
means all years match. For all fields besides year, at least one range must be present to match anything.
A timestamp matches if at least one range of each field matches except for year. If year is missing, that
Specification relative to calendar time when to run an action.
def self._from_proto(raw_cal)
def self._from_proto(raw_cal) Calendar.new( second: Range._from_protos(raw_cal.second), minute: Range._from_protos(raw_cal.minute), hour: Range._from_protos(raw_cal.hour), day_of_month: Range._from_protos(raw_cal.day_of_month), month: Range._from_protos(raw_cal.month), year: Range._from_protos(raw_cal.year), day_of_week: Range._from_protos(raw_cal.day_of_week), comment: Internal::ProtoUtils.string_or(raw_cal.comment) ) end
def _to_proto
def _to_proto Api::Schedule::V1::StructuredCalendarSpec.new( second: Range._to_protos(second), minute: Range._to_protos(minute), hour: Range._to_protos(hour), day_of_month: Range._to_protos(day_of_month), month: Range._to_protos(month), year: Range._to_protos(year), day_of_week: Range._to_protos(day_of_week), comment: comment || '' ) end
def initialize(
-
comment(String, nil) -- Description of this schedule. -
day_of_week(Array) -- Day of week range to match, 0-6, 0 is Sunday. Default matches all days. -
year(Array) -- Optional year range to match. Default of empty matches all years. -
month(Array) -- Month range to match, 1-12. Default matches all months. -
day_of_month(Array) -- Day of month range to match, 1-31. Default matches all days. -
hour(Array) -- Hour range to match, 0-23. Default matches 0. -
minute(Array) -- Minute range to match, 0-59. Default matches 0. -
second(Array) -- Second range to match, 0-59. Default matches 0.
def initialize( second: [Range.new(0)], minute: [Range.new(0)], hour: [Range.new(0)], day_of_month: [Range.new(1, 31)], month: [Range.new(1, 12)], year: [], day_of_week: [Range.new(0, 6)], comment: nil ) super end