is there a way to with a timer control the ON / OFF toggle for a Source?

im looking a way to only display every X time and have hidden every X time a loop source video that is like 2 seconds loop but wanna keep it ON x time ON and the x time OFF without making, i can make it loop but not turn OFF some times