Class: Temporalio::Client::Schedule::Spec
- Inherits:
-
Data
- Object
- Data
- Temporalio::Client::Schedule::Spec
- Defined in:
- lib/temporalio/client/schedule.rb,
lib/temporalio/client/schedule.rb
Overview
Specification of the times scheduled actions may occur.
The times are the union of #calendars, #intervals, and #cron_expressions excluding anything in #skip.
Defined Under Namespace
Instance Attribute Summary collapse
-
#calendars ⇒ Array<Calendar>
Calendar-based specification of times.
-
#cron_expressions ⇒ Array<String>
Cron-based specification of times.
-
#end_at ⇒ Time?
Time after which any matching times will be skipped.
-
#intervals ⇒ Array<Interval>
Interval-based specification of times.
-
#jitter ⇒ Float?
Jitter to apply each action.
-
#skip ⇒ Array<Calendar>
Set of matching calendar times that will be skipped.
-
#start_at ⇒ Time?
Time before which any matching times will be skipped.
-
#time_zone_name ⇒ String?
IANA time zone name, for example ‘US/Central`.
Instance Method Summary collapse
-
#initialize(calendars: [], intervals: [], cron_expressions: [], skip: [], start_at: nil, end_at: nil, jitter: nil, time_zone_name: nil) ⇒ Spec
constructor
Create a spec.
Constructor Details
#initialize(calendars: [], intervals: [], cron_expressions: [], skip: [], start_at: nil, end_at: nil, jitter: nil, time_zone_name: nil) ⇒ Spec
Create a spec.
503 504 505 506 507 508 509 510 511 512 513 514 |
# File 'lib/temporalio/client/schedule.rb', line 503 def initialize( calendars: [], intervals: [], cron_expressions: [], skip: [], start_at: nil, end_at: nil, jitter: nil, time_zone_name: nil ) super end |
Instance Attribute Details
#calendars ⇒ Array<Calendar>
Returns Calendar-based specification of times.
475 476 477 |
# File 'lib/temporalio/client/schedule.rb', line 475 def calendars @calendars end |
#cron_expressions ⇒ Array<String>
Returns Cron-based specification of times. This is provided for easy migration from legacy string-based cron scheduling. New uses should use ‘calendars` instead. These expressions will be translated to calendar-based specifications on the server.
475 476 477 |
# File 'lib/temporalio/client/schedule.rb', line 475 def cron_expressions @cron_expressions end |
#end_at ⇒ Time?
Returns Time after which any matching times will be skipped.
475 476 477 |
# File 'lib/temporalio/client/schedule.rb', line 475 def end_at @end_at end |
#intervals ⇒ Array<Interval>
Returns Interval-based specification of times.
475 476 477 |
# File 'lib/temporalio/client/schedule.rb', line 475 def intervals @intervals end |
#jitter ⇒ Float?
Returns Jitter to apply each action. An action’s scheduled time will be incremented by a random value between 0 and this value if present (but not past the next schedule).
475 476 477 |
# File 'lib/temporalio/client/schedule.rb', line 475 def jitter @jitter end |
#skip ⇒ Array<Calendar>
Returns Set of matching calendar times that will be skipped.
475 476 477 |
# File 'lib/temporalio/client/schedule.rb', line 475 def skip @skip end |
#start_at ⇒ Time?
Returns Time before which any matching times will be skipped.
475 476 477 |
# File 'lib/temporalio/client/schedule.rb', line 475 def start_at @start_at end |
#time_zone_name ⇒ String?
Returns IANA time zone name, for example ‘US/Central`.
475 476 477 |
# File 'lib/temporalio/client/schedule.rb', line 475 def time_zone_name @time_zone_name end |