class Rufus::Scheduler::JobArray

def each(now, &block)

def each(now, &block)
  to_a.sort_by { |j| j.next_time || (now + 1) }.each do |job|
    break unless job.next_time
    break if job.next_time > now
    block.call(job)
  end
end