CronOptions Struct
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.
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
The day of the month to run this rule at.
The hour to run this rule at.
The minute to run this rule at.
The month to run this rule at.
The day of the week to run this rule at.
The year to run this rule at.