Gapped Sine in material?

Basically I want a flashing light function but I don’t want it to flash constantly, I want it to flash occasionally and be able to specify the time between flashes. Is there a way to insert gaps into a sine? If I can do that, is it possible to make the number of waves and length of the gaps into a parameter?