- Newest
- Most votes
- Most comments
Hello.
Redshift's scheduled queries are created behind the scenes by EventBridge.
In other words, I think you can enable and disable EventBridge using AWS CLI, etc.
https://docs.aws.amazon.com/redshift/latest/mgmt/query-editor-schedule-query.html
To create a schedule to run a SQL statement, you can use the query editor on the Amazon Redshift console. You can create a schedule to run your SQL statement at the time intervals that match your business needs. When it's time for the scheduled query to run, Amazon EventBridge initiates the query.
Use "disable-rule" to disable an event rule.
When enabling an event rule, you need to use "put-rule" and specify "--schedule-expression" as an option.
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/events/put-rule.html
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/events/disable-rule.html
aws events disable-rule --name test
aws events put-rule --name test --state ENABLED --schedule-expression "rate(1 hour)"
Relevant content
- asked 9 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 3 months ago