create a daily cron for 9 AM UTC
- User
create a daily cron for 9 AM UTC
Assistant
To create a daily CloudWatch Event Rule trigger at 9 AM UTC, use the following
schedule_expressionin your Terraform configuration:resource "aws_cloudwatch_event_rule" "daily_lambda_trigger" { name = var.rule_name description = var.rule_description schedule_expression = "cron(0 9 * * ? *)" # 9 AM UTC daily is_enabled = true }Key Details:
-
Cron Format:
cron(0 9 * * ? *)0: Minute 0 (top of the hour)9: Hour 9 (in 24-hour UTC time)*: Every day of the month*: Every month?: No specific day of the week (required when using*for day-of-month)*: Every year
-
Notes:
- UTC Time: The cron runs at 09:00 UTC regardless of your AWS account's configured time zone.
is_enabled: This attribute is not deprecated and correctly enables/disables the rule.
Verification:
- The rule will trigger daily at:
- 09:00 UTC
- 10:00 CET (Central European Time)
- 05:00 EDT (Eastern Daylight Time)
- 02:00 PDT (Pacific Daylight Time)
For more complex schedules, see AWS Schedule Expressions.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.