class Rufus::Scheduler

def jobs(opts={})


(even those right before re-schedule).
Returns all the scheduled jobs
def jobs(opts={})
  opts = { opts => true } if opts.is_a?(Symbol)
  jobs = @jobs.to_a
  if opts[:running]
    jobs = jobs.select { |j| j.running? }
  elsif ! opts[:all]
    jobs = jobs.reject { |j| j.next_time.nil? || j.unscheduled_at }
  end
  tags = Array(opts[:tag] || opts[:tags]).collect { |t| t.to_s }
  jobs = jobs.reject { |j| tags.find { |t| ! j.tags.include?(t) } }
  jobs
end