Last active
September 12, 2017 14:09
-
-
Save swateek/6ec0e24559e3c94556316879d4e91a8b to your computer and use it in GitHub Desktop.
A python piece that can run some function at regular 'x' seconds interval
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 datetime import datetime | |
import time | |
def task(): | |
print "This is my task at - " + str(datetime.now()) | |
while True: | |
task() | |
time.sleep(5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment