我试图设置一个CloudWatch计划事件规则,该规则将在每季度运行一次。但是我收到这个错误
"Parameter ScheduleExpression is not valid".
我尝试遵循Cron表达式
cron(0 0 1 */3 * ?)
cron(0 0 1 */3 ? *)
但是没有用。有人可以帮忙吗?
根据AWS文档
您不能在“每月的日期”和“每周的日期”字段中使用*。如果将它与一个一起使用,则必须使用?在另一个。
此外,年份字段不支持?
通配符,因此您的第一个表达式无效。
第二个作品:
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"
}
右方括号后是否有空格?那个被标记为对我无效
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.
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句