A comparison between transitions induced by random and periodic fluctuations