Schedule
- class aws_cdk.aws_synthetics.Schedule(*args: Any, **kwargs)
Bases:
object
(experimental) Schedule for canary runs.
- Stability:
experimental
- ExampleMetadata:
infused
Example:
schedule = synthetics.Schedule.rate(Duration.minutes(5))
Attributes
- expression_string
(experimental) The Schedule expression.
- Stability:
experimental
Static Methods
- classmethod cron(*, day=None, hour=None, minute=None, month=None, week_day=None)
(experimental) Create a schedule from a set of cron fields.
- Parameters:
day (
Optional
[str
]) – (experimental) The day of the month to run this rule at. Default: - Every day of the monthhour (
Optional
[str
]) – (experimental) The hour to run this rule at. Default: - Every hourminute (
Optional
[str
]) – (experimental) The minute to run this rule at. Default: - Every minutemonth (
Optional
[str
]) – (experimental) The month to run this rule at. Default: - Every monthweek_day (
Optional
[str
]) – (experimental) The day of the week to run this rule at. Default: - Any day of the week
- Stability:
experimental
- Return type:
- classmethod expression(expression)
(experimental) 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)')
- Parameters:
expression (
str
) – The expression to use.- Stability:
experimental
- Return type:
- classmethod once()
(experimental) The canary will be executed once.
- Stability:
experimental
- Return type:
- classmethod rate(interval)
(experimental) 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()
.