schedule
Python job scheduling for humans.
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).
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.
Where it fits
- Run a data fetch or sync function every 10 minutes inside a long-running Python script.
- Schedule a daily report to send at a specific time in a named timezone like Europe/Amsterdam.
- Automate a recurring cleanup task without adding a background process or system-level cron dependency.