Skip to content

Instantly share code, notes, and snippets.

@raylu
Created November 18, 2015 01:38
Show Gist options
  • Save raylu/69f4acd1fc094c66ba73 to your computer and use it in GitHub Desktop.
Save raylu/69f4acd1fc094c66ba73 to your computer and use it in GitHub Desktop.
cron
#!/usr/bin/env python3
import time
import cron
def do_stuff1():
print('stuff1!')
def do_stuff2():
#1 / 0
print('stuff2!')
cron.init()
cron.schedule(5, do_stuff1)
#time.sleep(1)
#cron.schedule(2, do_stuff2)
cron.wait()
print('done!')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment