The sentences are correct, but it would be more common to hear them without a duration of and a period of , since minutes and hours are clearly periods of time. (If duration and period are used, the article a is necessary. ) -The cake was baked in the oven for 30 minutes.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.