run a subprocess in batch mode
