And that's a bad idea.
Spices come from plants, and they get their flavor from oils in the seeds or bark.
These oils start to lose potency when picked and deteriorate further with time and exposure. Always store spices in cool, dark places. That means away from the stove and away from the window or other light sources. Keep containers tightly sealed to avoid exposure to air and humidity. Purchase whole spices when possible and grind them only as you need them.