Execute cmds in batches