This is a known issue: when the crontab line contains both the day of the week and the day of the month, cron uses OR to calculate the day to run the command. For example. if you write
* * 13 * 5 command
the team will be executed every Friday and every 13th day of the month, and not only on Fridays, which occupy 13th place. This contradicts the format for other fields (when you write 30 2 * * *, it will be executed only when both hours and minutes - exactly what you specified is the same for all other fields except DoW and DoM when they are both specified )
So my question is: is there a specific reason for this exception? I mean, there must be a reason, but I cannot find it. (And instead, I see a lot of people on the Internet who would like these fields to be handled by both others and the I-strategy for things like Friday the 13th or the second Thursday of May. .)
source
share