如何为每个季度添加 CloudWatch 计划事件规则?
How can I add CloudWatch schedule event rule for every quarter?
我正在尝试设置一个 CloudWatch 计划事件规则,该规则将 运行 每个季度。但是我收到这个错误
"Parameter ScheduleExpression is not valid".
我尝试了以下 Cron 表达式
cron(0 0 1 */3 * ?)
cron(0 0 1 */3 ? *)
但是没有用。有人可以帮忙吗?
You cannot use * in both the Day-of-month and Day-of-week fields. If you use it in one, you must use ? in the other.
此外,年份字段不支持 ?
通配符,因此您的第一个表达式无效。
第二个有效:
aws events put-rule --schedule-expression "cron(0 0 1 */3 ? *)" --name so-test1
{
"RuleArn": "arn:aws:events:eu-west-1:3333:rule/so-test1"
}
右括号后有 space 吗?那个标记为对我无效
aws events put-rule --schedule-expression "cron(0 0 1 */3 ? *) " --name so-test1
An error occurred (ValidationException) when calling the PutRule operation: Parameter ScheduleExpression is not valid.
我正在尝试设置一个 CloudWatch 计划事件规则,该规则将 运行 每个季度。但是我收到这个错误
"Parameter ScheduleExpression is not valid".
我尝试了以下 Cron 表达式
cron(0 0 1 */3 * ?)
cron(0 0 1 */3 ? *)
但是没有用。有人可以帮忙吗?
You cannot use * in both the Day-of-month and Day-of-week fields. If you use it in one, you must use ? in the other.
此外,年份字段不支持 ?
通配符,因此您的第一个表达式无效。
第二个有效:
aws events put-rule --schedule-expression "cron(0 0 1 */3 ? *)" --name so-test1
{
"RuleArn": "arn:aws:events:eu-west-1:3333:rule/so-test1"
}
右括号后有 space 吗?那个标记为对我无效
aws events put-rule --schedule-expression "cron(0 0 1 */3 ? *) " --name so-test1
An error occurred (ValidationException) when calling the PutRule operation: Parameter ScheduleExpression is not valid.