I’m trying to create a dynamic task scheduler with cron syntax.
How does cron handle days that overflow the number of days in the month? For example, now it’s February with 29 days. How would cron handle the day expressions 31 or */2?
If */2 is expanded to 1,3,5..29,31 I could see that 31 is dropped. But that wouldn’t work so well if day is just 31. Any idea?
I believe cron just ignores it if it doesn’t match. The way the man page is written says that it matches if either the day of month match or the day of week matches. Some implementations (cronie for instance) just evaluate */2 in DoM to 1,3,5,7..,31, so it must ignore 31 in February.