Skip to content

Instantly share code, notes, and snippets.

@audy
Created October 12, 2010 04:53
Show Gist options
  • Select an option

  • Save audy/621682 to your computer and use it in GitHub Desktop.

Select an option

Save audy/621682 to your computer and use it in GitHub Desktop.
# use 24-hour time format!
import time, os, sys
wh, wm = [ int(i) for i in sys.argv[1].split(':') ]
while True:
hour, minute = list(time.localtime())[3:5]
if hour >= wh and minute >= wm:
break # Snap!
time.sleep(60) # There's no time.snooze()
os.system("open http://tinysong.com/id4j")
@audy

audy commented Oct 12, 2010

Copy link
Copy Markdown
Author

you use it like this:

$ python alarm_shark.py 6:45

or maybe like this:

$ python alarm_shark.py 16:00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment