-
Notifications
You must be signed in to change notification settings - Fork 78
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
Docs regarding named ranges or lists incorrect? #62
Comments
Would you like to submit the patch as pull request? |
preed
added a commit
to preed/cronie
that referenced
this issue
Jul 14, 2020
… crontab entries. The crontab.5 manpage claims "Names can also be used for the 'month' and 'day of week' fields. ... Ranges or lists of names are not allowed." Based on my reading of the source code (not entirely to be trusted) and an experiment I ran (more trustworthy), this is not actually true. See cronie-crond#62 for more info.
t8m
pushed a commit
that referenced
this issue
Jul 14, 2020
… crontab entries. The crontab.5 manpage claims "Names can also be used for the 'month' and 'day of week' fields. ... Ranges or lists of names are not allowed." Based on my reading of the source code (not entirely to be trusted) and an experiment I ran (more trustworthy), this is not actually true. See #62 for more info.
Fixed by #63 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe the following verbiage in
man/crontab.5
is incorrect:I perused the source code, and based on my reading (which you shouldn't trust :-) believe that the code indeed does convert weekday and month names into integers, and then uses the integers to trigger on the appropriate range (or list) of days (or months); see: https://github.com/cronie-crond/cronie/blob/master/src/entry.c#L248-L264 and https://github.com/cronie-crond/cronie/blob/master/src/entry.c#L438
I also just ran a test (just to be sure my reading of the source wasn't entirely off) using the follow crontab entries, and have been getting emails as expected all week:
I didn't try named month lists or ranges, but looking at the code, it uses very similar logic for month-names, so it seems like it should also work.
I suggest the following patch:
The text was updated successfully, but these errors were encountered: