Search code examples
cron

Cron periodicity works unclear with month days


I have expression 0 0 6/2 * *

it will run anything every second day starting from 6 day of month and in next month it can be earlier than 6 day? Example cron runs:

2022-06-06
2022-06-08
2022-06-10
...
2022-06-26
2022-06-28
2022-06-30
2022-07-02
2022-07-04
2022-07-06
2022-07-08
...

Does it work like this or cron run only from 6 day every month?


Solution

  • From here

    At 12:00 AM, every 2 days, starting on day 6 of the month

    So no, it will start on 6th day of month and then every 2 days