interface CronOptionsWithTimezone
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Scheduler.Alpha.CronOptionsWithTimezone |
Go | github.com/aws/aws-cdk-go/awscdkscheduleralpha/v2#CronOptionsWithTimezone |
Java | software.amazon.awscdk.services.scheduler.alpha.CronOptionsWithTimezone |
Python | aws_cdk.aws_scheduler_alpha.CronOptionsWithTimezone |
TypeScript (source) | @aws-cdk/aws-scheduler-alpha ยป CronOptionsWithTimezone |
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.
Example
declare const target: targets.LambdaInvoke;
const rateBasedSchedule = new Schedule(this, 'Schedule', {
schedule: ScheduleExpression.rate(Duration.minutes(10)),
target,
description: 'This is a test rate-based schedule',
});
const cronBasedSchedule = new Schedule(this, 'Schedule', {
schedule: ScheduleExpression.cron({
minute: '0',
hour: '23',
day: '20',
month: '11',
timeZone: TimeZone.AMERICA_NEW_YORK,
}),
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',
});
Properties
Name | Type | Description |
---|---|---|
day? | string | The day of the month to run this rule at. |
hour? | string | The hour to run this rule at. |
minute? | string | The minute to run this rule at. |
month? | string | The month to run this rule at. |
time | Time | The timezone to run the schedule in. |
week | string | The day of the week to run this rule at. |
year? | string | The year to run this rule at. |
day?
Type:
string
(optional, default: Every day of the month)
The day of the month to run this rule at.
hour?
Type:
string
(optional, default: Every hour)
The hour to run this rule at.
minute?
Type:
string
(optional, default: Every minute)
The minute to run this rule at.
month?
Type:
string
(optional, default: Every month)
The month to run this rule at.
timeZone?
Type:
Time
(optional, default: TimeZone.ETC_UTC)
The timezone to run the schedule in.
weekDay?
Type:
string
(optional, default: Any day of the week)
The day of the week to run this rule at.
year?
Type:
string
(optional, default: Every year)
The year to run this rule at.