AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::Scheduler::Schedule

CfnSchedule

A *schedule* is the main resource you create, configure, and manage using Amazon EventBridge Scheduler. Every schedule has a *schedule expression* that determines when, and with what frequency, the schedule runs. EventBridge Scheduler supports three types of schedules: rate, cron, and one-time schedules. For more information about different schedule types, see [Schedule types](https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html) in the *EventBridge Scheduler User Guide* . When you create a schedule, you configure a target for the schedule to invoke. A target is an API operation that EventBridge Scheduler calls on your behalf every time your schedule runs. EventBridge Scheduler supports two types of targets: *templated* targets invoke common API operations across a core groups of services, and customizeable *universal* targets that you can use to call more than 6,000 operations across over 270 services. For more information about configuring targets, see [Managing targets](https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-targets.html) in the *EventBridge Scheduler User Guide* . For more information about managing schedules, changing the schedule state, setting up flexible time windows, and configuring a dead-letter queue for a schedule, see [Managing a schedule](https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-schedule.html) in the *EventBridge Scheduler User Guide* .

Import

import { CfnSchedule } from 'aws-cdk-lib/aws-scheduler';

Or use the module namespace:

import * as scheduler from 'aws-cdk-lib/aws-scheduler';
// scheduler.CfnSchedule

Properties

Configuration passed to the constructor as CfnScheduleProps.

flexibleTimeWindowRequired
IResolvable | FlexibleTimeWindowProperty

Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.

scheduleExpressionRequired
string

The expression that defines when the schedule runs. The following formats are supported. - `at` expression - `at(yyyy-mm-ddThh:mm:ss)` - `rate` expression - `rate(value unit)` - `cron` expression - `cron(fields)` You can use `at` expressions to create one-time schedules that invoke a target once, at the time and in the time zone, that you specify. You can use `rate` and `cron` expressions to create recurring schedules. Rate-based schedules are useful when you want to invoke a target at regular intervals, such as every 15 minutes or every five days. Cron-based schedules are useful when you want to invoke a target periodically at a specific time, such as at 8:00 am (UTC+0) every 1st day of the month. A `cron` expression consists of six fields separated by white spaces: `(minutes hours day_of_month month day_of_week year)` . A `rate` expression consists of a *value* as a positive integer, and a *unit* with the following options: `minute` | `minutes` | `hour` | `hours` | `day` | `days` For more information and examples, see [Schedule types on EventBridge Scheduler](https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html) in the *EventBridge Scheduler User Guide* .

targetRequired
IResolvable | TargetProperty

The schedule's target details.

descriptionOptional
string

The description you specify for the schedule.

endDateOptional
string

The date, in UTC, before which the schedule can invoke its target. Depending on the schedule's recurrence expression, invocations might stop on, or before, the `EndDate` you specify. EventBridge Scheduler ignores `EndDate` for one-time schedules.

groupNameOptional
string

The name of the schedule group associated with this schedule.

kmsKeyArnOptional
string | IKeyRef

The Amazon Resource Name (ARN) for the customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data.

nameOptional
string

The name of the schedule.

scheduleExpressionTimezoneOptional
string

The timezone in which the scheduling expression is evaluated.

startDateOptional
string

The date, in UTC, after which the schedule can begin invoking its target. Depending on the schedule's recurrence expression, invocations might occur on, or after, the `StartDate` you specify. EventBridge Scheduler ignores `StartDate` for one-time schedules.

stateOptional
string

Specifies whether the schedule is enabled or disabled. *Allowed Values* : `ENABLED` | `DISABLED`

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

LevelL1 (CloudFormation)
Moduleaws-scheduler
CFN TypeAWS::Scheduler::Schedule
Properties11

External Links