Able to specify minutes for hour-based schedule. Closing #26

This commit is contained in:
Dzmitry Plashchynski
2015-05-28 17:43:02 +03:00
parent f909873165
commit c28a0bbc8a
2 changed files with 22 additions and 3 deletions

View File

@@ -49,7 +49,10 @@ module Crono
end
def parse_at(at)
fail "period should be at least 1 day to use 'at'" if @period < 1.day
if @period < 1.day && (at.is_a? String || at[:hour])
fail "period should be at least 1 day to use 'at' with specified hour"
end
case at
when String
time = Time.parse(at)