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
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
});
Properties
The day of the month to run this rule at.
Default: Every day of the month
The hour to run this rule at.
Default: Every hour
The minute to run this rule at.
Default: Every minute
The month to run this rule at.
Default: Every month
weekDayoptionalstringweek_dayoptionalstrweekDayoptionalStringWeekDayoptionalstringWeekDayoptional*string#The day of the week to run this rule at.
Default: Any day of the week