class Schedule
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.AutoScaling.Schedule |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsautoscaling#Schedule |
Java | software.amazon.awscdk.services.autoscaling.Schedule |
Python | aws_cdk.aws_autoscaling.Schedule |
TypeScript (source) | aws-cdk-lib » aws_autoscaling » Schedule |
Schedule for scheduled scaling actions.
Example
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
});
Initializer
new Schedule()
Properties
| Name | Type | Description |
|---|---|---|
| expression | string | Retrieve the expression for this schedule. |
expressionString
Type:
string
Retrieve the expression for this schedule.
Methods
| Name | Description |
|---|---|
| static cron(options) | Create a schedule from a set of cron fields. |
| static expression(expression) | Construct a schedule from a literal schedule expression. |
static cron(options)
public static cron(options: CronOptions): Schedule
Parameters
- options
CronOptions
Returns
Create a schedule from a set of cron fields.
static expression(expression)
public static expression(expression: string): Schedule
Parameters
- expression
string— The expression to use.
Returns
Construct a schedule from a literal schedule expression.
See also: http://crontab.org/

.NET
Go
Java
Python
TypeScript (