Created
April 20, 2017 13:38
-
-
Save AlexJoz/c3a39ad13cba2f2492240eed5b0fbc2c to your computer and use it in GitHub Desktop.
Python Twisted call func every minute =)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from twisted.internet import task | |
from twisted.internet import reactor | |
timeout = 60.0 # Sixty seconds | |
def doWork(): | |
#do work here | |
pass | |
l = task.LoopingCall(doWork) | |
l.start(timeout) # call every sixty seconds | |
reactor.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment