Class CronOptionsWithTimezone
(experimental) Options to configure a cron expression.
Inheritance
Namespace: Amazon.CDK.AWS.Scheduler.Alpha
Assembly: Amazon.CDK.AWS.Scheduler.Alpha.dll
Syntax (csharp)
public class CronOptionsWithTimezone : Object, ICronOptionsWithTimezone, ICronOptions
Syntax (vb)
Public Class CronOptionsWithTimezone
Inherits Object
Implements ICronOptionsWithTimezone, ICronOptions
Remarks
All fields are strings so you can use complex expressions. Absence of a field implies '*' or '?', whichever one is appropriate.
Stability: Experimental
See: https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions
ExampleMetadata: infused
Examples
LambdaInvoke target;
var rateBasedSchedule = new Schedule(this, "Schedule", new ScheduleProps {
Schedule = ScheduleExpression.Rate(Duration.Minutes(10)),
Target = target,
Description = "This is a test rate-based schedule"
});
var cronBasedSchedule = new Schedule(this, "Schedule", new ScheduleProps {
Schedule = ScheduleExpression.Cron(new CronOptionsWithTimezone {
Minute = "0",
Hour = "23",
Day = "20",
Month = "11",
TimeZone = TimeZone.AMERICA_NEW_YORK
}),
Target = target,
Description = "This is a test cron-based schedule that will run at 11:00 PM, on day 20 of the month, only in November in New York timezone"
});
Synopsis
Constructors
CronOptionsWithTimezone() |
Properties
Day | The day of the month to run this rule at. |
Hour | The hour to run this rule at. |
Minute | The minute to run this rule at. |
Month | The month to run this rule at. |
TimeZone | (experimental) The timezone to run the schedule in. |
WeekDay | The day of the week to run this rule at. |
Year | The year to run this rule at. |
Constructors
CronOptionsWithTimezone()
public CronOptionsWithTimezone()
Properties
Day
The day of the month to run this rule at.
public string Day { get; set; }
Property Value
System.String
Remarks
Default: - Every day of the month
Hour
The hour to run this rule at.
public string Hour { get; set; }
Property Value
System.String
Remarks
Default: - Every hour
Minute
The minute to run this rule at.
public string Minute { get; set; }
Property Value
System.String
Remarks
Default: - Every minute
Month
The month to run this rule at.
public string Month { get; set; }
Property Value
System.String
Remarks
Default: - Every month
TimeZone
(experimental) The timezone to run the schedule in.
public TimeZone TimeZone { get; set; }
Property Value
Remarks
Default: - TimeZone.ETC_UTC
Stability: Experimental
WeekDay
The day of the week to run this rule at.
public string WeekDay { get; set; }
Property Value
System.String
Remarks
Default: - Any day of the week
Year
The year to run this rule at.
public string Year { get; set; }
Property Value
System.String
Remarks
Default: - Every year