# Schedule

Schedule for scheduled scaling actions.

- Source: [`aws-autoscaling/lib/schedule.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-autoscaling/lib/schedule.ts#L8)
- Type last changed: v2.97.1 · 26 Sep 2023

## Example

```ts
declare const autoScalingGroup: autoscaling.AutoScalingGroup;

autoScalingGroup.scaleOnSchedule('PrescaleInTheMorning', {
  schedule: autoscaling.Schedule.cron({ hour: '8', minute: '0' }),
  minCapacity: 20,
});

autoScalingGroup.scaleOnSchedule('AllowDownscalingAtNight', {
  schedule: autoscaling.Schedule.cron({ hour: '20', minute: '0' }),
  minCapacity: 1
});
```

## Initializer

```ts
new Schedule()
```

## Properties

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

## Methods

- `cron(options: CronOptions): Schedule // chainable` (static) — Create a schedule from a set of cron fields.

- `expression(expression: string): Schedule // chainable` (static) — Construct a schedule from a literal schedule expression.

  **Parameters**

  - `expression` — The expression to use.
