From 2117b0474ed980fb7cd38c6d167ec0e3acb770b3 Mon Sep 17 00:00:00 2001 From: Andrew Haust Date: Thu, 6 Jul 2017 13:26:12 -0400 Subject: [PATCH] Don't always nudge the minute https://github.com/siebertm/parse-cron/issues/17#issuecomment-49483331 --- lib/cron_parser.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cron_parser.rb b/lib/cron_parser.rb index 41a8a5e..1f7b433 100644 --- a/lib/cron_parser.rb +++ b/lib/cron_parser.rb @@ -96,8 +96,8 @@ def next(now = @time_source.now, num = 1) t.min = -1 end - # always nudge the minute - nudge_minute(t) + # always nudge the minute unless... + nudge_minute(t) unless time_specs[:minute][0].include?(t.min) t = t.to_time if num > 1 recursive_calculate(:next,t,num)