How to stop runner after one pipeline?

I need to manage the time each user spends using our build resources so I would like to have the runner terminate after it completes a pipeline. I have the runner already configured to only run one pipeline at a time but I need to make sure it doesn’t pick up a second pipeline when it’s finished.

I was considering a runner stop command in the post build script but I’m not sure if that runs before or after the artifact upload or if it would even work correctly. If it halts the runner after it has already started the next pipeline that will be a problem.