ragnamex
ragnamex

Reputation: 1

Cron Expression in aws weekly

Is it possible to create a cron in AWS CloudWatch that runs every hour from 9:30 a.m. to 4:30 p.m. Monday through Friday?

In the documentation here, the closest example I have is this:

0/5, 8-17, ?, *, MON-FRI, * = Run every 5 minutes Monday through Friday between 8:00 am and 5:55 pm (UTC+0).

from the example above, where is it defined that it will end at "55 "minutes after "5" hours? Ignoring that, something like this occurs to me:

0/60, 9-16, ?, *, MON-FRI, *

but I'm not sure what it means or if it's correct, also it's not starting from 9:30 but from 9:00

I hope you can help me, thanks in advance

Upvotes: 0

Views: 460

Answers (1)

Hithru
Hithru

Reputation: 66

I used this calculator to verify and generate cron expressions.

In the example you provide 0/5, 8-17, ?, *, MON-FRI, *

  • 0/5:- means it runs every five minutes starting at 00 minutes (00 minutes inclusive)
  • 8-17:- means it runs between 8 and 17 hours with both 8 and 17 inclusive.

So For your use case:- 0, 10-16, ?, *, MON-FRI, *

(since hours between 9.30 - 4.30 are 10-16 and it only needs to run at the start of the hour which means 00 minutes)

Upvotes: 1

Related Questions