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

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

No files matched your search

+4 -1
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)