Skip to content

Instantly share code, notes, and snippets.

@elevenpassin
Last active October 25, 2017 17:28
Show Gist options
  • Save elevenpassin/d57c490be26f6dd9a3bcedca48ae8a9f to your computer and use it in GitHub Desktop.
Save elevenpassin/d57c490be26f6dd9a3bcedca48ae8a9f to your computer and use it in GitHub Desktop.
Opens a browser window every 30 minutes to ensure you don't sit for continuously for long hours.
import webbrowser
import time
total_breaks = 500
break_count = 0
break_time = 1
print("Script started at " + time.ctime())
webbrowser.open("https://www.youtube.com/watch?v=uiKg6JfS658")
while (break_count < total_breaks):
time.sleep(break_time * 1800)
print(time.ctime() + "It's time for a break!")
webbrowser.open("https://www.youtube.com/watch?v=uiKg6JfS658")
break_count = break_count + 1
import webbrowser
import time
total_breaks = 500
break_count = 0
break_time = 1
print("Script started at " + time.ctime())
webbrowser.open("https://www.youtube.com/watch?v=uiKg6JfS658")
while (break_count < total_breaks):
time.sleep(break_time * 1800)
print(time.ctime() + "It's time for a break!")
webbrowser.open("https://www.youtube.com/watch?v=uiKg6JfS658")
break_count = break_count + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment