Skip to content

Using the schedule Library for Python

It’s simple for:

  • “run every hour”
  • “run at 09:00 daily”
schedule_example.py
import schedule
import time
 
 
def job():
    print("running")
 
 
schedule.every(10).seconds.do(job)
 
while True:
    schedule.run_pending()
    time.sleep(1)
  • this keeps a process running
  • for server deployment, cron/systemd is usually better

Exercise 2 – Join Paths with os.path.join

Section titled “Exercise 2 – Join Paths with os.path.join”

pch.coffeeTagline

pch.coffeeCta

pch.feedbackHeading

pch.feedbackSubheading