-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when day of the month and day of the week both a specified #18
Comments
If both are specified, I think Cron (at least typical versions on Linux) would accept either matching, see e.g. http://manpages.ubuntu.com/manpages/xenial/man5/crontab.5.html
I had been meaning to look into this because a project I maintain, which uses this module, has a method for matching datetimes which I wrote before the CronTab.test method was added. I think both my method and CronTab.test would require both day specifiers to match (if you could construct the object in the first place). |
That is a perfectly valid cron schedule. The module should accept that data, and should work correctly. One note about the example schedule; that the job would run once/minute for all 1440 minutes every Friday. I'll work on getting this fixed and pushed. Will update this bug with more info, when it happens. |
This is fixed in 0.21.3, which is on PyPI now. |
Awesome, thanks 👍 |
Came across this case where if the day of the month is also specified along with day of the week (eg. Friday the 13th), it results in a ValueError
When day of month is not specified, it works fine
Not sure if this is a valid combination to use as per the cron spec as I didn't find anything mentioned about it here - https://en.wikipedia.org/wiki/Cron#CRON_expression.
The text was updated successfully, but these errors were encountered: