Runner queue problem

some times the first runner stops working for a while and the second one starts working. (I think the reason is that I have used remote command and when it comes to this point the second one starts working and the first runner stops) what is solution? my purpose is firstly end first pipeline and then seconds