Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. import msvcrt
  2. import schedule
  3. import time
  4.  
  5. def wake_up():
  6. print("It is 8 am, it is time to wake up.")
  7.  
  8. def have_lunch():
  9. print("12 noon, it is time to have lunch")
  10.  
  11. def part_time_job():
  12. print("5 pm, it is time to go for my part time job.")
  13.  
  14. schedule.every().day.at("08:00").do(wake_up)
  15. schedule.every().day.at("12:00").do(have_lunch)
  16. schedule.every().day.at("18:17").do(part_time_job)
  17. print("Reminders set to: 8am, 12am, 5pm.\nPress Esc to terminate..")
  18.  
  19. while 1:
  20. schedule.run_pending()
  21. time.sleep(1)
  22. if msvcrt.kbhit():
  23. if ord(msvcrt.getch()) == 27:
  24. break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement