Skip to content

Instantly share code, notes, and snippets.

@swateek
Last active September 12, 2017 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swateek/6ec0e24559e3c94556316879d4e91a8b to your computer and use it in GitHub Desktop.
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
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