Biswajit Maharana
Biswajit Maharana

Reputation: 609

AWS EventBridge - ScheduleExpression with cron

I'm trying to achieve a cron task based event bridge rule and facing one issue. I'll get a timestamp in input and want to create a cron expression to run the rule hourly starting from the input timestamp. For example if the input timestamp is 14:30 then the cron expression that my program builds looks something like this

"cron(30 14/1 * * * ? *)"

But while creating the eventbridge rule I'm getting the following error

AmazonServiceException thrown while handling: Parameter ScheduleExpression is not valid. ValidationException

Can someone help me with this? What's wrong in this expression?

Upvotes: 0

Views: 1688

Answers (1)

Shawn
Shawn

Reputation: 9442

From this documentation:

Cron expressions have six required fields, which are separated by white space.

So you have too many fields in your expression. Try

"cron(30 14/1 * * ? *)"

Upvotes: 0

Related Questions