Created
April 22, 2015 05:02
-
-
Save x/e70d745a6a9d1d1bf8e0 to your computer and use it in GitHub Desktop.
looping scheduled function python
This file contains hidden or 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
import time, sched | |
scheduler = sched.scheduler(time.time, time.sleep) | |
def do_stuff(): | |
scheduler.enter(3, 1, do_stuff, ()) | |
print "hi" | |
scheduler.enter(3, 1, do_stuff, ()) | |
scheduler.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment