Writing a Single Cron Expression for a Schedule Spanning Past Midnight

0

Hello. I've been working on scheduling a Task in ECS and wrote the following cron expression: cron(30 18-17/1 ? * SUN *). My intended schedule, based on UTC time, was to have the task run every hour starting from 6:30 PM on Sunday until 5:30 PM the following Monday, resulting in 24 executions starting from Sunday evening.

However, according to CloudWatch, the last execution was at 11:30 PM on Sunday. I'm concerned that if I set the days as SUN-MON, it might undesirably start running again from 6:30 PM on Monday.

I'm unsure whether I should set up two separate tasks for Sunday and Monday or if there's a different way I should write the cron expression.

I'm not very fluent in English, so I used a translator. If my question isn't clear, please let me know in the comments. I'll try to explain in more detail.

junsu
질문됨 4달 전170회 조회
1개 답변
0
수락된 답변

well, I just enrolled 2 sperated tasks. one is cron(30 18-24/1 ? * SUN *), the other is cron(30 0-17/1 ? * MON *). I hope it helps someone solve issues.

junsu
답변함 3달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠