docs(synthetics): canary schedule section in README#15352
docs(synthetics): canary schedule section in README#15352mergify[bot] merged 5 commits intoaws:masterfrom
Conversation
BenChaimberg
left a comment
There was a problem hiding this comment.
thank you for improving our documentation! these are the most important contributions in my book, so sorry for the massive comment-to-changed-line ratio
|
|
||
| Configure a run rate of up to 60 minutes with `synthetics.Schedule.rate`: | ||
|
|
||
| ```js |
There was a problem hiding this comment.
| ```js | |
| ```ts |
|
|
||
| If expanded access to scheduling the canary is needed, use `synthetics.Schedule.expression` with [cron expressions, as defined here](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_cron.html), for example: | ||
|
|
||
| ```js |
There was a problem hiding this comment.
| ```js | |
| ```ts |
|
|
||
|
|
||
| ### Canary Schedule | ||
| You can set the canary `schedule` property by assigning it a value with the `synthetics.Schedule` [class](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-synthetics.Schedule.html). |
There was a problem hiding this comment.
"set the canary schedule property" is not really a helpful statement, how about something like "Specify the schedule on which a canary runs by providing a Schedule value to the schedule property."?
| synthetics.Schedule.rate(Duration.minutes(5)), // Run every 5 minutes. | ||
| ``` | ||
|
|
||
| If expanded access to scheduling the canary is needed, use `synthetics.Schedule.expression` with [cron expressions, as defined here](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_cron.html), for example: |
There was a problem hiding this comment.
| If expanded access to scheduling the canary is needed, use `synthetics.Schedule.expression` with [cron expressions, as defined here](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_cron.html), for example: | |
| If expanded access to scheduling the canary is needed, use `Schedule.expression` with [cron expressions](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_cron.html): |
| ```js | ||
| synthetics.Schedule.expression('cron(0 0,8,16 * * ? *)'), // Run at 12am, 8am, 4pm UTC every day | ||
| ``` | ||
|
|
There was a problem hiding this comment.
please also add a small section about once
| Configure a run rate of up to 60 minutes with `synthetics.Schedule.rate`: | ||
|
|
||
| ```js | ||
| synthetics.Schedule.rate(Duration.minutes(5)), // Run every 5 minutes. |
There was a problem hiding this comment.
| synthetics.Schedule.rate(Duration.minutes(5)), // Run every 5 minutes. | |
| Schedule.rate(Duration.minutes(5)), // Run every 5 minutes. |
| ### Canary Schedule | ||
| You can set the canary `schedule` property by assigning it a value with the `synthetics.Schedule` [class](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-synthetics.Schedule.html). | ||
|
|
||
| Configure a run rate of up to 60 minutes with `synthetics.Schedule.rate`: |
There was a problem hiding this comment.
| Configure a run rate of up to 60 minutes with `synthetics.Schedule.rate`: | |
| Configure a run rate of up to 60 minutes with `Schedule.rate`: |
| If expanded access to scheduling the canary is needed, use `synthetics.Schedule.expression` with [cron expressions, as defined here](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_cron.html), for example: | ||
|
|
||
| ```js | ||
| synthetics.Schedule.expression('cron(0 0,8,16 * * ? *)'), // Run at 12am, 8am, 4pm UTC every day |
There was a problem hiding this comment.
| synthetics.Schedule.expression('cron(0 0,8,16 * * ? *)'), // Run at 12am, 8am, 4pm UTC every day | |
| Schedule.expression('cron(0 0,8,16 * * ? *)'), // Run at 12am, 8am, 4pm UTC every day |
Pull request has been modified.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
This PR adds more extensive documentation for how to schedule CloudWatch Synthetics canary cron jobs via CDK, because today the service documentation for how to schedule cron jobs is lacking and takes developers a lot of investigation to figure out how to make it work successfully.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license