Periodically run a script

I am programming a TV standby killer with homeyscript.
It needs to check the power consumption every 15 minutes, and when it falls below a threshold, switch off.
I tried it directly with an advanced flow, but that did not work out, so therefore the script version.
What are the options to run the script every 15 minutes ?
I consider using an endless loop and use the wait function, but I am not sure if that will cost CPU time during waiting. And using endless loops is not a very elegant option.
Any ideas on periodically run scripts ?

Why not just use the washing machine principal of flows.
When power drops below xx power, start timer.
When power gets higher stop timer.
When timer is empty, turn off the plug.