Skip to content
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

Issue 59: Support crontab ranges 'x-y' and 'x/y' #47

Closed
wants to merge 2 commits into from

Conversation

ohinckel
Copy link
Member

(copied from mknx/smarthome#61)

I started to refactor the scheduler._range() function a little bit and implemented support for x/y and x-y as requested in issue #59. The function was changed to resolve the crontab elements from complex to simple elements.

The following complex elements are supported now in crontab setting:

  • list, e.g. 1,2,3,4,8-10
  • intervals, e.g. */2
  • ranges, e.g. 0-8

Since the resolving is implemented in a recusive way, it's also possible to combine all of them. E.g. you can use 1,2,3,4,8-10 or 1-4,5-23/2 or something similar. The first one will include the hours between 1-4 and 8-10, the second one will include the hours between 1-4 and each even hour between 5 and 23.

  . add support for interval specification using "/x"
  . add support for range specification using "x-y"
  . refactor a little bit to have one block which handles a single
  item, which is used recursively when using ",", "/x" or "x-y"
# implements suggestion of issue smarthomeNG#59
- log exception message when error occurs while analyzing the crontab
  entry
@ohinckel
Copy link
Member Author

Sorry, wrong branch. New PR created #49.

@ohinckel ohinckel closed this May 14, 2016
@ohinckel ohinckel deleted the issue-59-crontab-ranges branch September 4, 2016 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant