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
demandé il y a 4 mois170 vues
1 réponse
0
Réponse acceptée

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
répondu il y a 3 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions