Interface CronOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CronOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.138.0 (build 0ca7ee8)",
date="2026-08-10T14:50:59.379Z")
@Stability(Stable)
public interface CronOptions
extends software.amazon.jsii.JsiiSerializable
Options to configure a cron expression.
All fields are strings so you can use complex expressions. Absence of a field implies '*'.
Example:
Alarm alarm1;
Alarm alarm2;
AlarmMuteRule alarmMuteRule = AlarmMuteRule.Builder.create(this, "AlarmMuteRule")
.alarms(List.of(alarm1))
// Defines the mute period begins at 0:00 everyday in UTC
.schedule(ScheduleExpression.cron(CronOptions.builder().minute("0").hour("0").build()))
// Specifies the mute rule lasts 1 hour.
.duration(Duration.hours(1))
.build();
// The mute target can be added after construction.
alarmMuteRule.addAlarm(alarm2);
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCronOptionsstatic final classAn implementation forCronOptions -
Method Summary
Modifier and TypeMethodDescriptionstatic CronOptions.Builderbuilder()default StringgetDay()The day of the month to run this rule at.default StringgetHour()The hour to run this rule at.The minute to run this rule at.default StringgetMonth()The month to run this rule at.default TimeZoneThe timezone to run the schedule in.default StringThe day of the week to run this rule at.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getMinute
The minute to run this rule at. -
getDay
The day of the month to run this rule at.Default: - Every day of the month
-
getHour
The hour to run this rule at.Default: - Every hour
-
getMonth
The month to run this rule at.Default: - Every month
-
getTimeZone
The timezone to run the schedule in.Default: - TimeZone.ETC_UTC
-
getWeekDay
The day of the week to run this rule at.Default: - Any day of the week
-
builder
- Returns:
- a
CronOptions.BuilderofCronOptions
-