title: Swap Continuous Webjob in Azure production to staging slot
body: <p>Let's say I have a webapp in Azure that auto deploys a continuous webjob.  This webapp also has a <code>production</code> and <code>staging</code> slot, and the site deploys to <code>staging</code>, after which a swap happens (manually or automatic) to move the latest into the <code>production</code> slot.</p>
  
  <p>Further, let's assume that the <code>production</code> webjob is running and processing and generally doing it's job before the swap begins. When the deployment to <code>staging</code> happens, the latest webjob does not start because of the <code>WEBJOBS_STOPPED = 1</code> configuration setting that is honored.  </p>
  
  <p>However, after the swap completes, does the webjob that was previously in <code>production</code> and now is in <code>staging</code> continue running?  If not, how does it stop? When does it stop? When does the <code>WEBJOBS_STOPPED</code> flag begin to be honored when a running webjob is moved from a <code>production</code> slot to a <code>staging slot</code>?</p>
  
  <p>I can't have the two webjobs running at the same time and it's unclear what the behavior around a swap is... Continuous singletons are easy using the <code>is_singleton</code> property in the webjob settings, but <strong><em>"vertical"</em></strong> webjobs running at the same time around a swap doesn't appear to be clearly understood or documented.</p>