How to run simulations in the background