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 month

  • hour (Optional[str]) – (experimental) The hour to run this rule at. Default: - Every hour

  • minute (Optional[str]) – (experimental) The minute to run this rule at. Default: - Every minute

  • month (Optional[str]) – (experimental) The month to run this rule at. Default: - Every month

  • week_day (Optional[str]) – (experimental) The day of the week to run this rule at. Default: - Any day of the week

Stability:

experimental

Return type:

Schedule

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:

Schedule

classmethod once()

(experimental) The canary will be executed once.

Stability:

experimental

Return type:

Schedule

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().

Parameters:

interval (Duration) – The interval at which to run the canary.

Stability:

experimental

Return type:

Schedule