1

Is it possible to execute the code asynchronously in predefined intervals in Python like it's done in JS using the setTimer?

For example, the function example() will be called every 60 seconds in Python. How can I do that?

1 Answers1

1
import threading

def printit():
  threading.Timer(5.0, printit).start()
  print "Hello, World!"

printit()

the answer from: Run certain code every n seconds

Stefan
  • 160
  • 6