taichino / croniter

croniter is a python module to provide iteration for datetime object.
http://github.com/taichino/croniter
387 stars 105 forks source link

Infinite loop with valid cron syntax #98

Closed StasEvseev closed 5 years ago

StasEvseev commented 6 years ago

Hi guys!

Found issue with specific cron syntax. Could anybody help me with that?

croniter==0.3.16 run on Python2.7

croniter('0 0 29-31 * 3-4', day_or=False).get_prev(datetime.datetime)

It will go in infinite loop.

kiorky commented 5 years ago

Closing as not reproducible anymore, feel free to reopen with more details.

>>> import croniter
>>> import datetime
>>> croniter.croniter('0 0 29-31 * 3-4', day_or=False).get_prev(datetime.datetime)
datetime.datetime(2018, 11, 29, 0, 0)