Critial switch schedule

You could do something like this with Rule Machine. There is an example I posted here: Fun with Rules! that shows a simple looping mechanism using a virtual switch to help. You can pick the periodicity to be whatever, and you can kill the whole loop if the light actually is on (not in that example, but easy to do). That’s probably better than banging away at it no matter what.