how long you cook spaghetti squash will largely depend on the method you use. dry roasting spaghetti squash halves in a 400 degrees f oven will take about 25 minutes. microwaving a whole spaghetti squash will take 10 to 15 minutes. cooking spaghetti squash in an instant pot on high will take about 12 minutes.