Closed sebknzl closed 10 years ago
According to the wikipedia article, the hash only allows numbers between 1-5: http://en.wikipedia.org/wiki/Cron#Special_characters. Do other implementations differ from that?
Also, I noticed that the test-line "0 0 0 ? 1/2 FRI#2 *" from your blog doesn't work, probably there's an extra 0.
Thanks, I get that updated.
I can't really find an implementation supporting this hash-thing. Any discussion mentioning it seems to reference the Wikipedia-article (e.g. http://serverfault.com/questions/395262/weekly-alternating-cronjob-with-step-values) Normal cron wouldn't support that, as hashes start comments. It's useful nevertheless, but I don't see why it should support only Mon through Fri? For normal cron, stuff like e.g. "0 0 1-7 * 0" would be used instead of SUN#1.
I'd be fine with this if you want to submit a PR.
Normal cron wouldn't support that, as hashes start comments.
Only if the hash sign is preceded by blank characters.
"0 0 1-7 * 0" would be used instead of SUN#1
That doesn't work: the day-of-month and day-of-week fields are ORed, not ANDed together. So the above would result in the event being triggered for each day between the first and seventh day of the month and for every sunday.
Hello!
First off, thanks for the great library!!
I wonder why something like "0 22 ? * SUN#1 *" doesn't work, though... in DayOfWeekField:66 it forces weekday to be within [1,5]. Commenting out that part results in a "Impossible CRON expression" later.
Also, I noticed that the test-line "0 0 0 ? 1/2 FRI#2 *" from your blog doesn't work, probably there's an extra 0.
Thanks