Class: Temporalio::Client::Schedule::Spec::Calendar
- Inherits:
-
Data
- Object
- Data
- Temporalio::Client::Schedule::Spec::Calendar
- Defined in:
- lib/temporalio/client/schedule.rb,
lib/temporalio/client/schedule.rb
Overview
Specification relative to calendar time when to run an action.
A timestamp matches if at least one range of each field matches except for year. If year is missing, that means all years match. For all fields besides year, at least one range must be present to match anything.
Instance Attribute Summary collapse
-
#comment ⇒ String?
Description of this schedule.
-
#day_of_month ⇒ Array<Range>
Day of month range to match, 1-31.
-
#day_of_week ⇒ Array<Range>
Day of week range to match, 0-6, 0 is Sunday.
-
#hour ⇒ Array<Range>
Hour range to match, 0-23.
-
#minute ⇒ Array<Range>
Minute range to match, 0-59.
-
#month ⇒ Array<Range>
Month range to match, 1-12.
-
#second ⇒ Array<Range>
Second range to match, 0-59.
-
#year ⇒ Array<Range>
Optional year range to match.
Instance Method Summary collapse
-
#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) ⇒ Calendar
constructor
Create a calendar spec.
Constructor Details
#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) ⇒ Calendar
Create a calendar spec.
596 597 598 599 600 601 602 603 604 605 606 607 |
# File 'lib/temporalio/client/schedule.rb', line 596 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 |
Instance Attribute Details
#comment ⇒ String?
Returns Description of this schedule.
539 540 541 |
# File 'lib/temporalio/client/schedule.rb', line 539 def comment @comment end |
#day_of_month ⇒ Array<Range>
Returns Day of month range to match, 1-31. Default matches all days.
539 540 541 |
# File 'lib/temporalio/client/schedule.rb', line 539 def day_of_month @day_of_month end |
#day_of_week ⇒ Array<Range>
Returns Day of week range to match, 0-6, 0 is Sunday. Default matches all days.
539 540 541 |
# File 'lib/temporalio/client/schedule.rb', line 539 def day_of_week @day_of_week end |
#hour ⇒ Array<Range>
Returns Hour range to match, 0-23. Default matches 0.
539 540 541 |
# File 'lib/temporalio/client/schedule.rb', line 539 def hour @hour end |
#minute ⇒ Array<Range>
Returns Minute range to match, 0-59. Default matches 0.
539 540 541 |
# File 'lib/temporalio/client/schedule.rb', line 539 def minute @minute end |
#month ⇒ Array<Range>
Returns Month range to match, 1-12. Default matches all months.
539 540 541 |
# File 'lib/temporalio/client/schedule.rb', line 539 def month @month end |
#second ⇒ Array<Range>
Returns Second range to match, 0-59. Default matches 0.
539 540 541 |
# File 'lib/temporalio/client/schedule.rb', line 539 def second @second end |
#year ⇒ Array<Range>
Returns Optional year range to match. Default of empty matches all years.
539 540 541 |
# File 'lib/temporalio/client/schedule.rb', line 539 def year @year end |