srmk
srmk

Reputation: 85

AWS CRON expression to run 2 mins past every 5 mins

I currently have a cloud watch event that triggers a Lambda every 5 mins 00,05,10,15,20... schedule_expression = "cron(0/5 * * * ? *)" However, I would like to trigger the jobs at same 5 minutes interval but at 02,07,12,17. Is there a way to achieve that in AWS CRON schedule?

Upvotes: 1

Views: 1689

Answers (2)

srmk
srmk

Reputation: 85

Found the answer schedule_expression = "cron(2/5 * * * ? *)"

Upvotes: 2

Maurice
Maurice

Reputation: 13197

Is there anything stopping you from just inputting the numbers directly?

cron(2,7,12,17,22,27,32,37,42,47,52,57 * * ? *)

That should be a valid expression, no need for fancy arithmetic.

Upvotes: 2

Related Questions