@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.410Z") @Stability(value=Stable) public interface CronOptions extends software.amazon.jsii.JsiiSerializable
All fields are strings so you can use complex expressions. Absence of a field implies '*' or '?', whichever one is appropriate.
Example:
Cluster cluster;
ApplicationLoadBalancedFargateService loadBalancedFargateService = ApplicationLoadBalancedFargateService.Builder.create(this, "Service")
.cluster(cluster)
.memoryLimitMiB(1024)
.desiredCount(1)
.cpu(512)
.taskImageOptions(ApplicationLoadBalancedTaskImageOptions.builder()
.image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample"))
.build())
.build();
ScalableTaskCount scalableTarget = loadBalancedFargateService.service.autoScaleTaskCount(EnableScalingProps.builder()
.minCapacity(5)
.maxCapacity(20)
.build());
scalableTarget.scaleOnSchedule("DaytimeScaleDown", ScalingSchedule.builder()
.schedule(Schedule.cron(CronOptions.builder().hour("8").minute("0").build()))
.minCapacity(1)
.build());
scalableTarget.scaleOnSchedule("EveningRushScaleUp", ScalingSchedule.builder()
.schedule(Schedule.cron(CronOptions.builder().hour("20").minute("0").build()))
.minCapacity(10)
.build());
| Modifier and Type | Interface and Description |
|---|---|
static class |
CronOptions.Builder
A builder for
CronOptions |
static class |
CronOptions.Jsii$Proxy
An implementation for
CronOptions |
| Modifier and Type | Method and Description |
|---|---|
static CronOptions.Builder |
builder() |
default String |
getDay()
The day of the month to run this rule at.
|
default String |
getHour()
The hour to run this rule at.
|
default String |
getMinute()
The minute to run this rule at.
|
default String |
getMonth()
The month to run this rule at.
|
default String |
getWeekDay()
The day of the week to run this rule at.
|
default String |
getYear()
The year to run this rule at.
|
@Stability(value=Stable) @Nullable default String getDay()
Default: - Every day of the month
@Stability(value=Stable) @Nullable default String getHour()
Default: - Every hour
@Stability(value=Stable) @Nullable default String getMinute()
Default: - Every minute
@Stability(value=Stable) @Nullable default String getMonth()
Default: - Every month
@Stability(value=Stable) @Nullable default String getWeekDay()
Default: - Any day of the week
@Stability(value=Stable) @Nullable default String getYear()
Default: - Every year
@Stability(value=Stable) static CronOptions.Builder builder()
CronOptions.Builder of CronOptionsCopyright © 2022. All rights reserved.