run function every 30 seconds python code example
Example: run every minute python
from time import time, sleep
while True:
sleep(60 - time() % 60)
# thing to run
from time import time, sleep
while True:
sleep(60 - time() % 60)
# thing to run