copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

feat(job): schedule job at specific timezone

Open alquerci opened this issue 1 year ago • 0 comments

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 Rule renamed to Schedule
    • Resource RuleRole renamed to ScheduleRole
    • Regarding of backward compatibility policy, this may be a BC break
  • Configurable on manifest.yml but not during job 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.

alquerci avatar Feb 17 '25 21:02 alquerci