title: Rufus Scheduler: Every day, start a job at time X and process in batches with a fixed interval
body: <p>I am trying to figure out how to be able to do the following.</p>
  
  <p>I want to start a job at 12:00pm every day which computes a list of things and then processes these things in batches of size 'b'. and guarantee an interval of x minutes between the end of one batch and the beginning of another.</p>
  
  <pre><code>schedule.cron '00 12 * * *' do
      # things = Compute the list of things
      schedule.interval '10m', # Job.new(things[index, 10]) ???
  end
  </code></pre>
  
  <p>I tried something like the following but I hate that I have to pass in the scheduler to the job or access the singleton scheduler.</p>
  
  <pre><code>class Job &lt; Struct.new(:things, :batch_index, :scheduler)
    def call
      if (batch_index+1) &gt;= things.length
        ap "Done with all batches"
      else
        # Process batch
        scheduler.in('10m', Dummy.new(things, batch_index+1, scheduler))
      end
    end
  end
  
  scheduler = Rufus::Scheduler.new
  schedule.cron '00 12 * * *' , Dummy.new([ [1,2,3] , [4,5,6,7], [8,9,10]], 0, scheduler)
  </code></pre>