# ScheduleExpression

Schedule expression for CloudWatch alarm mute rule.

You can choose from three schedule types when configuring your schedule: cron-based and one-time schedules.
Cron-based schedule is recurring schedule.

- Source: [`aws-cloudwatch/lib/alarm-mute-rule.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-cloudwatch/lib/alarm-mute-rule.ts#L63)
- Type last changed: v2.264.0 · 10 Aug 2026

## Example

```ts
declare const alarm1: cloudwatch.Alarm;
declare const alarm2: cloudwatch.Alarm;

const alarmMuteRule = new cloudwatch.AlarmMuteRule(this, 'AlarmMuteRule', {
  alarms: [alarm1],
  // Defines the mute period begins at 0:00 everyday in UTC
  schedule: cloudwatch.ScheduleExpression.cron({ minute: '0', hour: '0' }),
  // Specifies the mute rule lasts 1 hour.
  duration: Duration.hours(1),
})

// The mute target can be added after construction.
alarmMuteRule.addAlarm(alarm2);
```

## Initializer

```ts
new ScheduleExpression()
```

## Properties

- `expressionString`: string — Retrieve the expression for this schedule.

- `timeZone`: [TimeZone](/cdk/api/v2/docs/aws-cdk-lib.TimeZone.html) — Retrieve the expression for this schedule.

## Methods

- `at(date: CalendarDateTime, timeZone?: TimeZone): ScheduleExpression // chainable` (static) — Construct a one-time schedule from a date.

  **Parameters**

  - `date` — The date and time to use.
  - `timeZone` — The time zone to use for interpreting the date.

- `cron(options: CronOptions): ScheduleExpression // chainable` (static) — Create a recurring schedule from a set of cron fields and time zone.

- `expression(expression: string, timeZone?: TimeZone): ScheduleExpression // chainable` (static) — Construct a schedule from a literal schedule expression.

  **Parameters**

  - `expression` — The expression to use.
  - `timeZone` — The time zone to use for interpreting the expression.
