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
feita há 4 meses170 visualizações
1 Resposta
0
Resposta aceita

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
respondido há 3 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas