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:
  • Method Details

    • getMinute

      @Stability(Stable) @NotNull String getMinute()
      The minute to run this rule at.
    • getDay

      @Stability(Stable) @Nullable default String getDay()
      The day of the month to run this rule at.

      Default: - Every day of the month

    • getHour

      @Stability(Stable) @Nullable default String getHour()
      The hour to run this rule at.

      Default: - Every hour

    • getMonth

      @Stability(Stable) @Nullable default String getMonth()
      The month to run this rule at.

      Default: - Every month

    • getTimeZone

      @Stability(Stable) @Nullable default TimeZone getTimeZone()
      The timezone to run the schedule in.

      Default: - TimeZone.ETC_UTC

    • getWeekDay

      @Stability(Stable) @Nullable default String getWeekDay()
      The day of the week to run this rule at.

      Default: - Any day of the week

    • builder

      @Stability(Stable) static CronOptions.Builder builder()
      Returns:
      a CronOptions.Builder of CronOptions