Fri Jul 25
#
“ If your pictures aren’t good enough, you’re not close enough. ”
Robert Capa
#
Lucky Strike & Sinatra
#
Date#at_some_point between:start and:end
class Date def at_some_point(options = {}) start_hour = options[:between] end_hour = options[:and] if start_hour && end_hour hours = rand_within(start_hour...end_hour) else hours = rand(24) end minutes = rand(60) seconds = rand(60) Time.mktime(year, month, day, hours, minutes, seconds) end end class Fixnum def am self == 12 ? 0 : self end def pm self == 12 ? self : self + 12 end end Job.schedule task, :to_run => Date.today.at_some_point( :between => 1.am, :and => 7.am )