class TimeWindow
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Scheduler.TimeWindow |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsscheduler#TimeWindow |
Java | software.amazon.awscdk.services.scheduler.TimeWindow |
Python | aws_cdk.aws_scheduler.TimeWindow |
TypeScript (source) | aws-cdk-lib » aws_scheduler » TimeWindow |
A time window during which EventBridge Scheduler invokes the schedule.
Example
declare const target: targets.LambdaInvoke;
const schedule = new Schedule(this, 'Schedule', {
schedule: ScheduleExpression.rate(Duration.hours(12)),
target,
timeWindow: TimeWindow.flexible(Duration.hours(10)),
});
Properties
| Name | Type | Description |
|---|---|---|
| mode | string | Determines whether the schedule is invoked within a flexible time window. |
| max | Duration | The maximum time window during which the schedule can be invoked. |
mode
Type:
string
Determines whether the schedule is invoked within a flexible time window.
maxWindow?
Type:
Duration
(optional, default: no value)
The maximum time window during which the schedule can be invoked.
Must be between 1 to 1440 minutes.
Methods
| Name | Description |
|---|---|
| static flexible(maxWindow) | TimeWindow is enabled. |
| static off() | TimeWindow is disabled. |
static flexible(maxWindow)
public static flexible(maxWindow: Duration): TimeWindow
Parameters
- maxWindow
Duration
Returns
TimeWindow is enabled.
static off()
public static off(): TimeWindow
Returns
TimeWindow is disabled.

.NET
Go
Java
Python
TypeScript (