Best way to implement recurring taskbrowsing

I'm currently working on a project what should call an API about every minute (the exact timing is not that important). In order to do it I have a while loop wich is paused after each loop for 60 seconds.

def loop():
while True:
update()
time.sleep(60)
loop()

Is there any better way to do this? It seems, that when I'm running the script and the script is actually paused you can't stop the script with tapping on the [x]. It seems to be waiting for the sleep to end and is terminating after that.

If this is from a ui, you could use ui.delay at the end of an function, which calls itself. Cancel would be handled by ui.cancel_delays(), either by button, or from will_close, or by checking on_screen etc.