Automatically Rerun Button

Is there a way to automatically rerun a dynamo script, used as a pushbutton, until I hit the escape key?

I know that on the pyRevit ribbon, there’s the match function where you can do a similar concept but I’m not as fluent in python yet.