title: Start job from another job
body: <p>Here is what I'm trying to achieve:
  As a user, I can book a spot for a class. If the class is already full, I'll be on the waiting list. When a new spot is available, I'll receive an email. From then, the app starts a background job that will "wait" 24h. If I haven't confirmed that I'm taking the spot before 24h, it is attributed to the next person on the waiting list, who will also have to confirm before 24h. </p>
  
  <p>The problem is when passing the spot to the next person on the list: since I'm already in the "timer job", I need to call it again with the next person.</p>
  
  <pre><code>class TimerJob
    def perform(user_id)
      send_confimation_email
      if #didn't confirm before 24h
        TimerJob.perform(next_user_on_list_id)
      else
        # save his spot
      end 
    end 
  end
  </code></pre>
  
  <p>The first job works fine, it sends an email, waits for a confirmation within 24h, and then sends another email to the next person on the list but doesn't start another job (line 5). So it won't start the process again if the 24h wait is over. </p>
  
  <p>So the question would be: how can I call a job within a job like in my example ? 
  Is there a reason why this isn't working ? </p>
  
  <p>Or am I over complicating this and a fresh eye would have an easier solution ? </p>
  
  <p>I thought of calling a <code>module</code> from within the job, which would basically call back the job. But same here, didn't work.
  Any input will be much appreciated.</p>