schedule
Simple Python library for scheduling jobs to run at regular intervals.
2. Maintained
github.com/dbader/schedule3. Used by agents' projects
Dependency in 16 public GitHub projects set up for AI coding agents that we scanned (0.3%).
4. Agent access
Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.
From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error
What schedule does
schedule runs periodic Python jobs inside your own process, set up with chained calls like <code>every().day.at("10:30")</code>, and its docs say plainly that it is only meant for simple scheduling problems.
schedule popularity
Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated
How schedule is used
- schedule is a dependency in 16 of the 6,258 public GitHub projects set up for AI coding agents that we scanned, too few to describe it from them alone. Our scan also samples projects by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750); counting those, it appears in 84 projects, and what it is used with below comes from all of them.
- The most used alternative in our scan is APScheduler (48 projects).
- Projects that use it most often also use python-dotenv (88.1%), Requests (78.6%), NumPy (60.7%).
By coding agent
Often used with
schedule in practice
Strengths
Jobs are declared with chains like <code>every().wednesday.at("13:15").do(job)</code> or <code>every(5).to(10).minutes</code>. The README says this works for any callable, not just plain functions.
The scheduler runs inside your Python process. The README says it needs no extra processes and has no external dependencies.
<code>.at()</code> takes an optional time zone, as in <code>at("12:42", "Europe/Amsterdam")</code>. The docs have a section on time zones and Daylight Saving Time.
The docs have examples for decorator-based jobs, passing arguments, cancelling a job and running a job once. There are also examples for tagging jobs, random intervals and running a job until a set time.
Watch out for
The maintainers say to look elsewhere if you need job persistence across restarts, sub-second timing, multi-threaded execution, or workday and holiday rules.
The docs say the scheduler does not count how long a job takes. Slow jobs need to run off the main thread, and the docs point to their Parallel execution section for a sample.
Jobs only fire when your code calls <code>run_pending()</code>, which the README does inside a <code>while True</code> loop. Keeping that loop from blocking the main thread is a question the docs' FAQ answers separately.
Periodic jobs from the README
import schedule
import time
def job():
print("I'm working...")
schedule.every(10).seconds.do(job)
schedule.every(10).minutes.do(job)
schedule.every().hour.do(job)
schedule.every().day.at("10:30").do(job)
schedule.every(5).to(10).minutes.do(job)
schedule.every().monday.do(job)
schedule.every().wednesday.at("13:15").do(job)
schedule.every().day.at("12:42", "Europe/Amsterdam").do(job)
schedule.every().minute.at(":17").do(job)
def job_with_argument(name):
print(f"I am {name}")
schedule.every(10).seconds.do(job_with_argument, name="Peter")
while True:
schedule.run_pending()
time.sleep(1)More about schedule
Agent Skills for it
- schedule-with-superhuman: Find a time and put a meeting on the calendar through Superhuman — read what is already booked, check the participants' availability, propos
- schedule-task: Create scheduled task or reminder. IMPORTANT - must actually call this tool to create task. Just saying 'OK I will remind you' does NOT crea
Packages around it
- python-dotenv: .env file loader
- requests: HTTP client
- numpy: Numeric arrays
- pandas: Dataframes
- solana: Solana Python SDK
- solders: Solana core types
More in Jobs, queues and workflows
Alternatives
schedule This page
In-process task scheduler with Cron-like capabilities for Python applications.
Distributed task queue for Python executing jobs asynchronously across workers.
Cron expression parser and iterator for Python, schedule tasks with cron-like timing.
Get started
Install it.
pip install scheduleRules for your agent
## schedule
- Install with `pip install schedule`, then declare jobs with chains like `schedule.every(10).minutes.do(job)`.
- Jobs only fire when `schedule.run_pending()` is called. Run it in a loop with `time.sleep(1)`, as the README does.
- Pass job arguments through `.do()`, for example `.do(job_with_argument, name="Peter")`.
- For a time zone, pass it as the second argument to `.at()`, for example `.at("12:42", "Europe/Amsterdam")`.
- The scheduler does not account for job run time. Move long-running jobs off the main thread (see the docs' Parallel execution section).
- Do not pick schedule when the task needs schedules that survive restarts, sub-second precision, multi-threaded execution, or workday and holiday rules. The docs say to look elsewhere.