简体   繁体   中英

Cronjob every x minutes from 9 to 23 hours

I need to configure cronjob at specific time, like every 50 minutes from 9 to 23 pm. And I am trying

  • */50 9-23 ***

But it runs at 9:50 and also at 10:00, I need some help. Thanks.

The time range you define it is converted into:

9 50
10 40
11 30
12 20
13 10
14 00
15 50 -
16 40
17 30
18 20
19 10
20 00
20 50 -
21 40
22 30

So that you need to define these different cronjobs:

50 9,15,20 * * *
40 10,16,21 * * *
30 11,17,22 * * *
20 12,18 * * *
10 13,19 * * *
00 14,20 * * *

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM