admin管理员组文章数量:1332389
I'm using AWS CloudShell to retrieve the configuration of my AWS EventBridge Schedule but this is returning an unusual ScheduleExpression causing problems downstream.
Commands I'm running in AWS CloudShell:
TARGET=$(aws scheduler get-schedule --name MY-SCHEDULE-NAME)
echo $TARGET
This returns
{
"ActionAfterCompletion": "NONE",
"Arn": "arn:aws:scheduler:eu-west-1:AWS-ID:schedule/default/MY-SCHEDULE-NAME",
"CreationDate": "2024-11-21T17:12:01.720000+00:00",
"Description": "MY-SCHEDULE-NAME",
"FlexibleTimeWindow": {
"Mode": "OFF"
},
"GroupName": "default",
"LastModificationDate": "2024-11-21T17:12:01.720000+00:00",
"Name": "MY-SCHEDULE-NAME",
"ScheduleExpression": "cron(00 05 ? new_target.json task-def.json 1 *)",
"ScheduleExpressionTimezone": "Europe/Amsterdam",
"State": "ENABLED",
"Target": {
"Arn": "arn:aws:ecs:eu-west-1:AWS-ID:cluster/MY-CLUSTER",
"EcsParameters": {
"EnableECSManagedTags": false,
"EnableExecuteCommand": false,
"LaunchType": "FARGATE",
"NetworkConfiguration": {
"awsvpcConfiguration": {
"AssignPublicIp": "DISABLED",
"SecurityGroups": [
"sg-123"
],
"Subnets": [
"subnet-123",
"subnet-123",
"subnet-123"
]
}
},
"PlatformVersion": "LATEST",
"PropagateTags": "TASK_DEFINITION",
"ReferenceId": "MY-TASK-DEFINITION",
"TaskCount": 1,
"TaskDefinitionArn": "arn:aws:ecs:eu-west-1:AWS-ID:task-definition/MY-TASK-DEFINITION-td:1"
},
"Input": "{\"containerOverrides\":[{\"environment\":[{\"name\":\"refresh_type\",\"value\":\"weekly\"}],\"name\":\"MY-TASK-DEFINITION\"}]}",
"RetryPolicy": {
"MaximumEventAgeInSeconds": 86400,
"MaximumRetryAttempts": 185
},
"RoleArn": "arn:aws:iam::AWS-ID:role/MY-SCHEDULE-NAME-schedule-exec-role"
}
}
As you can see, the ScheduleExpression is "cron(00 05 ? new_target.json task-def.json 1 *)"
. However, in the AWS Console, the Schedule is 00 05 ? * 1 *
. I have no idea where the new_target.json task-def.json
is coming from. I've tried editing the Schedule in Terraform and in the UI but no change in the response from AWS CloudShell. Do you have any idea what could be causing this?
Edit:
It seems that the first *
is causing this. When I edit the cron to 00 06 1 1 ? *
it works as expected. However, when I change it to 00 06 1 * ? *
it returns new_target.json task-def.json
.
本文标签: amazon web servicesaws scheduler getschedule returning unusual ScheduleExpressionStack Overflow
版权声明:本文标题:amazon web services - aws scheduler get-schedule returning unusual ScheduleExpression - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742291793a2447937.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论