class Schedule
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Synthetics.Schedule |
Java | software.amazon.awscdk.services.synthetics.Schedule |
Python | aws_cdk.aws_synthetics.Schedule |
TypeScript (source) | @aws-cdk/aws-synthetics » Schedule |
Schedule for canary runs.
Example
const schedule = synthetics.Schedule.rate(Duration.minutes(5)); // Runs every 5 minutes.
Properties
Name | Type | Description |
---|---|---|
expression | string | The Schedule expression. |
expressionString
Type:
string
The Schedule expression.
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 once() | The canary will be executed once. |
static rate(interval) | Construct a schedule from an interval. |
static cron(options)
public static cron(options: CronOptions): Schedule
Parameters
- options
Cron
Options
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.
The expression must be in a rate(number units)
format.
For example, Schedule.expression('rate(10 minutes)')
static once()
public static once(): Schedule
Returns
The canary will be executed once.
static rate(interval)
public static rate(interval: Duration): Schedule
Parameters
- interval
Duration
— The interval at which to run the canary.
Returns
Construct a schedule from an interval.
Allowed values: 0 (for a single run) or between 1 and 60 minutes.
To specify a single run, you can use Schedule.once()
.