explaingit

dbader/schedule

12,243PythonAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

Schedule is a tiny Python library with no dependencies for running functions on a fixed schedule, using readable syntax like every().day.at('10:30').do(job).

Mindmap

mindmap
  root((schedule))
    What it does
      Run functions on a timer
      Readable schedule syntax
      No external dependencies
    Schedule Types
      Every N seconds
      Daily at a fixed time
      Weekly on a day
      Random interval range
    Features
      Timezone support
      Pass function args
      No background process
    Tech Stack
      Python only
    Audience
      Python developers
      Automation builders
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Run a data fetch or sync function every 10 minutes inside a long-running Python script.

USE CASE 2

Schedule a daily report to send at a specific time in a named timezone like Europe/Amsterdam.

USE CASE 3

Automate a recurring cleanup task without adding a background process or system-level cron dependency.

Tech stack

Python

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, as long as you keep the MIT license copyright notice.

In plain English

Schedule is a small Python library for running functions automatically at set intervals. If you want a piece of code to execute every 10 seconds, or at 10:30 every morning, or every Monday at a specific time, this library lets you express that in plain, readable code rather than dealing with the complexity of system-level scheduling tools. The syntax reads closely to plain English. You write things like schedule.every().day.at("10:30").do(job) or schedule.every().monday.do(job), where job is whatever Python function you want to run. Time zones are supported, so you can specify a target time in a named zone like "Europe/Amsterdam." You can also pass arguments to your function and schedule jobs with a random interval within a range, such as every 5 to 10 minutes. Once your schedule is defined, you run a loop that repeatedly checks whether any scheduled tasks are due and runs them. The library has no external dependencies, adds no background processes, and keeps everything inside your Python program. It supports Python 3.7 through 3.12. The README is minimal and focuses on the code examples. Full documentation is at schedule.readthedocs.io. The project is inspired by an article called "Rethinking Cron" and by a similar Ruby library called clockwork. It is distributed under the MIT license.

Copy-paste prompts

Prompt 1
Using the schedule library, run my send_report() function every weekday at 9am in the America/New_York timezone.
Prompt 2
How do I schedule a Python job to run at a random interval between 5 and 10 minutes using the schedule library?
Prompt 3
Write a Python script that uses schedule to call a REST API every 30 seconds and log the response status.
Prompt 4
How do I pass arguments to a scheduled job function using the schedule library?
Open on GitHub → Explain another repo

← dbader on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.