# CfnScheduleProps

Properties for defining a `CfnSchedule`.

Extends: CfnScheduleProps
Used as props by: CfnSchedule

- Source: Generated code
- Type last changed: v2.227.0 · 21 Nov 2025

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_scheduler as scheduler } from 'aws-cdk-lib';

declare const tags: any;
const cfnScheduleProps: scheduler.CfnScheduleProps = {
  flexibleTimeWindow: {
    mode: 'mode',

    // the properties below are optional
    maximumWindowInMinutes: 123,
  },
  scheduleExpression: 'scheduleExpression',
  target: {
    arn: 'arn',
    roleArn: 'roleArn',

    // the properties below are optional
    deadLetterConfig: {
      arn: 'arn',
    },
    ecsParameters: {
      taskDefinitionArn: 'taskDefinitionArn',

      // the properties below are optional
      capacityProviderStrategy: [{
        capacityProvider: 'capacityProvider',

        // the properties below are optional
        base: 123,
        weight: 123,
      }],
      enableEcsManagedTags: false,
      enableExecuteCommand: false,
      group: 'group',
      launchType: 'launchType',
      networkConfiguration: {
        awsvpcConfiguration: {
          subnets: ['subnets'],

          // the properties below are optional
          assignPublicIp: 'assignPublicIp',
          securityGroups: ['securityGroups'],
        },
      },
      placementConstraints: [{
        expression: 'expression',
        type: 'type',
      }],
      placementStrategy: [{
        field: 'field',
        type: 'type',
      }],
      platformVersion: 'platformVersion',
      propagateTags: 'propagateTags',
      referenceId: 'referenceId',
      tags: tags,
      taskCount: 123,
    },
    eventBridgeParameters: {
      detailType: 'detailType',
      source: 'source',
    },
    input: 'input',
    kinesisParameters: {
      partitionKey: 'partitionKey',
    },
    retryPolicy: {
      maximumEventAgeInSeconds: 123,
      maximumRetryAttempts: 123,
    },
    sageMakerPipelineParameters: {
      pipelineParameterList: [{
        name: 'name',
        value: 'value',
      }],
    },
    sqsParameters: {
      messageGroupId: 'messageGroupId',
    },
  },

  // the properties below are optional
  description: 'description',
  endDate: 'endDate',
  groupName: 'groupName',
  kmsKeyArn: 'kmsKeyArn',
  name: 'name',
  scheduleExpressionTimezone: 'scheduleExpressionTimezone',
  startDate: 'startDate',
  state: 'state',
};
```

## Properties

- `description`: string — The description you specify for the schedule.

- `endDate`: 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.

- `flexibleTimeWindow`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnSchedule.FlexibleTimeWindowProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_scheduler.CfnSchedule.FlexibleTimeWindowProperty.html) (required) — Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.

- `groupName`: string — The name of the schedule group associated with this schedule.

- `kmsKeyArn`: string | [IKeyRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_kms.IKeyRef.html) — The Amazon Resource Name (ARN) for the customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data.

- `name`: string — The name of the schedule.

- `scheduleExpression`: string (required) — 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* .

- `scheduleExpressionTimezone`: string — The timezone in which the scheduling expression is evaluated.

- `startDate`: 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.

- `state`: string — Specifies whether the schedule is enabled or disabled.

  *Allowed Values* : `ENABLED` | `DISABLED`

- `target`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnSchedule.TargetProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_scheduler.CfnSchedule.TargetProperty.html) (required) — The schedule's target details.
