# CronOptions

Options to configure a cron expression.

All fields are strings so you can use complex expressions. Absence of
a field implies '*' or '?', whichever one is appropriate.

- Source: [`aws-events/lib/schedule.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-events/lib/schedule.ts#L96)

## Example

```ts
import * as events from 'aws-cdk-lib/aws-events';
import * as targets from 'aws-cdk-lib/aws-events-targets';

declare const fn: lambda.Function;
const rule = new events.Rule(this, 'Schedule Rule', {
 schedule: events.Schedule.cron({ minute: '0', hour: '4' }),
});
rule.addTarget(new targets.LambdaFunction(fn));
```

## Properties

- `day`: string — The day of the month to run this rule at.

  **Default:** Every day of the month

- `hour`: string — The hour to run this rule at.

  **Default:** Every hour

- `minute`: string — The minute to run this rule at.

  **Default:** Every minute

- `month`: string — The month to run this rule at.

  **Default:** Every month

- `weekDay`: string — The day of the week to run this rule at.

  **Default:** Any day of the week

- `year`: string — The year to run this rule at.

  **Default:** Every year
