title: How do you delay and schedule a stage to only run the latest build in an Azure Devops yaml pipeline?
body: <p>How do you schedule a stage to run at a particular time of day in a multi stage azure devops pipeline but for only the latest build?</p>
  <p>For example, let's say I have a combined build and release pipeline...</p>
  <ul>
  <li>I do 4 check-ins that day</li>
  <li>4 pipelines, each with a build and release stage are created (1 for each check-in). The build phases complete as the code is merged</li>
  <li>I don't want to deploy after every check-in so I schedule the release stage to run overnight</li>
  </ul>
  <p>Once it reaches the release scheduled time isn't it going to kick off 4 simultaneous deployments for each pipeline that was created that day? How would I ensure it only schedules the latest? What if I wanted to ensure it also runs that deployment stage even if there have been no code changes?</p>
  <p>I can solve this requirement with classic releases by scheduling the release to be created and deployed at a certain time with the latest artifact. It then doesn't matter how many builds were run that day.</p>