copilot-cli
copilot-cli copied to clipboard
feat(job): schedule job at specific timezone
Fixes #4604
Summary of changes
- Full code coverage, from unit to integration
- EventBridge Schedule that replace CloudWatch Event Rule.
- UTC as default time zone
- Allowing expression like 'at(2022-11-20T13:00:00)'
- To handle issue: CloudFormation reject resource type modification
- Resource
Rulerenamed toSchedule - Resource
RuleRolerenamed toScheduleRole - Regarding of backward compatibility policy, this may be a BC break
- Resource
- Configurable on
manifest.ymlbut not duringjob init - Reference to the documentation
# job manifest.yml
# Trigger for your task.
on:
# The scheduled trigger for your job. You can specify a Unix cron schedule or keyword (@weekly) or a rate (@every 1h30m)
# AWS Schedule Expressions are also accepted: https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html
schedule: "rate(5 minutes)"
# The timezone in which the scheduling expression is evaluated.
# You can specify a time location like (America/New_York) or like (CET)
# More details: https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html#time-zones
timezone: "UTC"
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the Apache 2.0 License.