diff --git a/lib/whenever/outputs/cron.rb b/lib/whenever/outputs/cron.rb index 0217e7a..03110d0 100644 --- a/lib/whenever/outputs/cron.rb +++ b/lib/whenever/outputs/cron.rb @@ -60,7 +60,7 @@ module Whenever end if shortcut - if @at > 0 + if @at.is_a?(Time) || (@at.is_a?(Numeric) && @at>0) raise ArgumentError, "You cannot specify an ':at' when using the shortcuts for times." else return shortcut