Class: AWSCDK::Scheduler::CronOptionsWithTimezone
- Inherits:
-
Events::CronOptions
- Object
- Events::CronOptions
- AWSCDK::Scheduler::CronOptionsWithTimezone
- Defined in:
- scheduler/cron_options_with_timezone.rb
Overview
Options to configure a cron expression.
All fields are strings so you can use complex expressions. Absence of a field implies '*' or '?', whichever one is appropriate.
Instance Attribute Summary collapse
-
#day ⇒ String?
readonly
The day of the month to run this rule at.
-
#hour ⇒ String?
readonly
The hour to run this rule at.
-
#minute ⇒ String?
readonly
The minute to run this rule at.
-
#month ⇒ String?
readonly
The month to run this rule at.
-
#time_zone ⇒ AWSCDK::TimeZone?
readonly
The timezone to run the schedule in.
-
#week_day ⇒ String?
readonly
The day of the week to run this rule at.
-
#year ⇒ String?
readonly
The year to run this rule at.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(day: nil, hour: nil, minute: nil, month: nil, week_day: nil, year: nil, time_zone: nil) ⇒ CronOptionsWithTimezone
constructor
A new instance of CronOptionsWithTimezone.
- #to_jsii ⇒ Object
Constructor Details
#initialize(day: nil, hour: nil, minute: nil, month: nil, week_day: nil, year: nil, time_zone: nil) ⇒ CronOptionsWithTimezone
Returns a new instance of CronOptionsWithTimezone.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'scheduler/cron_options_with_timezone.rb', line 19 def initialize(day: nil, hour: nil, minute: nil, month: nil, week_day: nil, year: nil, time_zone: nil) @day = day Jsii::Type.check_type(@day, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "day") unless @day.nil? @hour = hour Jsii::Type.check_type(@hour, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "hour") unless @hour.nil? @minute = minute Jsii::Type.check_type(@minute, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "minute") unless @minute.nil? @month = month Jsii::Type.check_type(@month, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "month") unless @month.nil? @week_day = week_day Jsii::Type.check_type(@week_day, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "weekDay") unless @week_day.nil? @year = year Jsii::Type.check_type(@year, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "year") unless @year.nil? @time_zone = time_zone Jsii::Type.check_type(@time_zone, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5UaW1lWm9uZSJ9")), "timeZone") unless @time_zone.nil? end |
Instance Attribute Details
#day ⇒ String? (readonly)
Default: - Every day of the month
The day of the month to run this rule at.
40 41 42 |
# File 'scheduler/cron_options_with_timezone.rb', line 40 def day @day end |
#hour ⇒ String? (readonly)
Default: - Every hour
The hour to run this rule at.
45 46 47 |
# File 'scheduler/cron_options_with_timezone.rb', line 45 def hour @hour end |
#minute ⇒ String? (readonly)
Default: - Every minute
The minute to run this rule at.
50 51 52 |
# File 'scheduler/cron_options_with_timezone.rb', line 50 def minute @minute end |
#month ⇒ String? (readonly)
Default: - Every month
The month to run this rule at.
55 56 57 |
# File 'scheduler/cron_options_with_timezone.rb', line 55 def month @month end |
#time_zone ⇒ AWSCDK::TimeZone? (readonly)
Default: - TimeZone.ETC_UTC
The timezone to run the schedule in.
70 71 72 |
# File 'scheduler/cron_options_with_timezone.rb', line 70 def time_zone @time_zone end |
#week_day ⇒ String? (readonly)
Default: - Any day of the week
The day of the week to run this rule at.
60 61 62 |
# File 'scheduler/cron_options_with_timezone.rb', line 60 def week_day @week_day end |
#year ⇒ String? (readonly)
Default: - Every year
The year to run this rule at.
65 66 67 |
# File 'scheduler/cron_options_with_timezone.rb', line 65 def year @year end |
Class Method Details
.jsii_properties ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 |
# File 'scheduler/cron_options_with_timezone.rb', line 72 def self.jsii_properties { :day => "day", :hour => "hour", :minute => "minute", :month => "month", :week_day => "weekDay", :year => "year", :time_zone => "timeZone", } end |
Instance Method Details
#to_jsii ⇒ Object
84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'scheduler/cron_options_with_timezone.rb', line 84 def to_jsii result = {} result.merge!(super) result.merge!({ "day" => @day, "hour" => @hour, "minute" => @minute, "month" => @month, "weekDay" => @week_day, "year" => @year, "timeZone" => @time_zone, }) result.compact end |