G
G
gitdev2021-06-14 06:33:56
Task Schedulers
gitdev, 2021-06-14 06:33:56

How to run a cron task between 20:00 - 5:00 every minute of every day?

There is a data import task and you need to run this work only at night from 20:00 - 5:00 every minute or even every 30 seconds. What is the best way to implement this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2021-06-14
@gitdev

* 20-23,0-5 * * *

V
Vasily Bannikov, 2021-06-14
@vabka

0/30 * 0,1,2,3,4,5,20,21,22,23 ? * * *
https://www.freeformatter.com/cron-expression-gene...
The only difficulty is that you cannot set the range from 20 to 05, so you must explicitly specify every hour.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question