Run commands in threads