This doesn't affect when there's a division e.g. H(30-29)/2 H * * * works fine
The library doesn't produce valid results when range_end is less than range_begin. Having a look, it seems like the library could raise a Bad Cron Error to the elif m['range_begin'] and m['range_end']: section in expand.
Happy to raise a PR and add a new unit test for this if you think it's the right approach.
Division by zero possible with ranges
The oss-fuzz croniter project integration originally found an out of range exception with this string.
This issue is around the
r(1-0)
sectionSome other reproductions of the issue
You can force a modulo zero in
croniter.py:894
by settingrange_end
to1
less thanrange_begin
This doesn't affect when there's a division e.g.
H(30-29)/2 H * * *
works fineThe library doesn't produce valid results when
range_end
is less thanrange_begin
. Having a look, it seems like the library could raise a Bad Cron Error to theelif m['range_begin'] and m['range_end']:
section inexpand
.Happy to raise a PR and add a new unit test for this if you think it's the right approach.