Schedule
- class aws_cdk.aws_synthetics.Schedule(*args: Any, **kwargs)
Bases:
object
Schedule for canary runs.
- ExampleMetadata:
infused
Example:
canary = synthetics.Canary(self, "MyCanary", schedule=synthetics.Schedule.rate(Duration.minutes(5)), test=synthetics.Test.custom( code=synthetics.Code.from_asset(path.join(__dirname, "canary")), handler="index.handler" ), runtime=synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2, active_tracing=True )
Attributes
- expression_string
The Schedule expression.
Static Methods
- classmethod cron(*, day=None, hour=None, minute=None, month=None, week_day=None)
Create a schedule from a set of cron fields.
- Parameters:
day (
Optional
[str
]) – The day of the month to run this rule at. Default: - Every day of the monthhour (
Optional
[str
]) – The hour to run this rule at. Default: - Every hourminute (
Optional
[str
]) – The minute to run this rule at. Default: - Every minutemonth (
Optional
[str
]) – The month to run this rule at. Default: - Every monthweek_day (
Optional
[str
]) – The day of the week to run this rule at. Default: - Any day of the week
- Return type:
- classmethod expression(expression)
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.- Return type: