seejohnrun/ice_cube — Issue #45: Some rules hang the computer
Author: sleepycat
Created: 2011-12-08 14:04:57+00:00
State: open

I have a rule that is causing my computer to hang. CPU usage goes up really high and I have yet to find the patience to wait long enough for this to return, assuming it returns at all.
Here is how to reproduce:

```ruby
ruby-1.9.2-p290 :014 > rule = IceCube::Rule.from_yaml "--- \n:interval: 1\n:count: \n:rule_type: IceCube::MonthlyRule\n:until: \n:validations: \n :day: \n - 5\n :hour_of_day: \n - 14\n :second_of_minute: \n - 0\n :day_of_month: \n - 13\n :minute_of_hour: \n - 0\n :month_of_year: \n - 10\n"
=> Monthly on Fridays on the 14th hour of the day on the 0th second of the minute on the 13th day of the month on the 0th minute of the hour in October
ruby-1.9.2-p290 :015 > schedule = IceCube::Schedule.new(Time.now)
=>
ruby-1.9.2-p290 :016 > schedule.add_recurrence_rule(rule)
=> [#]
ruby-1.9.2-p290 :017 > schedule.first
```

If you could shed some light on this it would be great.
Thanks.