{
 "kind": "tool",
 "slug": "schedule",
 "path": "tools/schedule/",
 "name": "schedule",
 "maker": null,
 "density": "profile",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Jobs, queues and workflows",
   "tools/jobs-workflows/"
  ]
 ],
 "lead": "Simple Python library for scheduling jobs to run at regular intervals.",
 "chips": [
  {
   "label": "Jobs, queues and workflows",
   "path": "tools/jobs-workflows/"
  },
  {
   "label": "PYPI"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "pip install schedule"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/dbader/schedule"
  },
  {
   "label": "Website",
   "href": "https://github.com/dbader/schedule"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from PyPI classifier.",
   "src": "https://github.com/dbader/schedule"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Quiet for a year",
   "status": "cond",
   "sub": "Last change May 25, 2024",
   "note": "",
   "src": "https://github.com/dbader/schedule"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "16 projects",
   "status": "info",
   "sub": "#8 of 48 in its category",
   "note": "Dependency in 16 public GitHub projects set up for AI coding agents that we scanned (0.3%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Community skills",
   "status": "info",
   "sub": "2 skills by others",
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What schedule does",
   "parts": [
    {
     "t": "prose",
     "text": "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."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "schedule popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "57",
       "of": "/ 100",
       "l": "Gid Score, #1225 overall"
      },
      {
       "n": "1.5M",
       "l": "downloads a week, pypi"
      },
      {
       "n": "12.3K",
       "l": "GitHub stars"
      },
      {
       "n": "16",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How schedule is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "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%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "8 projects, 0.2%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "7 projects, 0.2%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "5 projects, 0.2%",
       "v": "Cursor",
       "path": "agents/cursor/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 88.1% of its projects",
       "v": "python-dotenv",
       "path": "tools/python-dotenv/"
      },
      {
       "l": "In 78.6% of its projects",
       "v": "Requests",
       "path": "tools/requests-py/"
      },
      {
       "l": "In 60.7% of its projects",
       "v": "NumPy",
       "path": "tools/numpy/"
      },
      {
       "l": "In 57.1% of its projects",
       "v": "pandas",
       "path": "tools/pandas/"
      },
      {
       "l": "In 56.0% of its projects",
       "v": "Pydantic",
       "path": "tools/pydantic/"
      },
      {
       "l": "In 54.8% of its projects",
       "v": "Uvicorn",
       "path": "tools/uvicorn/"
      },
      {
       "l": "In 53.6% of its projects",
       "v": "OpenAI Python Library",
       "path": "tools/openai-pypi/"
      },
      {
       "l": "In 48.8% of its projects",
       "v": "FastAPI",
       "path": "tools/fastapi/"
      }
     ]
    }
   ]
  },
  {
   "id": "profile",
   "nav": "Profile",
   "h2": "schedule in practice",
   "parts": [
    {
     "t": "h3",
     "text": "Strengths"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Schedules read almost like sentences",
       "v": "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."
      },
      {
       "l": "Nothing to deploy beside your script",
       "v": "The scheduler runs inside your Python process. The README says it needs no extra processes and has no external dependencies."
      },
      {
       "l": "Time zones in .at()",
       "v": "<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."
      },
      {
       "l": "Docs cover the everyday job tasks",
       "v": "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."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Watch out for"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "The docs list what it will not do",
       "v": "The maintainers say to look elsewhere if you need job persistence across restarts, sub-second timing, multi-threaded execution, or workday and holiday rules."
      },
      {
       "l": "Long jobs push the schedule back",
       "v": "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."
      },
      {
       "l": "You own the loop",
       "v": "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."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Periodic jobs from the README"
    },
    {
     "t": "tabs",
     "label": "Example",
     "items": [
      {
       "tab": "Python",
       "code": "import schedule\nimport time\n\ndef job():\n    print(\"I'm working...\")\n\nschedule.every(10).seconds.do(job)\nschedule.every(10).minutes.do(job)\nschedule.every().hour.do(job)\nschedule.every().day.at(\"10:30\").do(job)\nschedule.every(5).to(10).minutes.do(job)\nschedule.every().monday.do(job)\nschedule.every().wednesday.at(\"13:15\").do(job)\nschedule.every().day.at(\"12:42\", \"Europe/Amsterdam\").do(job)\nschedule.every().minute.at(\":17\").do(job)\n\ndef job_with_argument(name):\n    print(f\"I am {name}\")\n\nschedule.every(10).seconds.do(job_with_argument, name=\"Peter\")\n\nwhile True:\n    schedule.run_pending()\n    time.sleep(1)"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "profile",
   "h2": "More about schedule",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Agent Skills for it",
       "path": "skills/",
       "items": [
        "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"
       ]
      },
      {
       "title": "Packages around it",
       "items": [
        "python-dotenv: .env file loader",
        "requests: HTTP client",
        "numpy: Numeric arrays",
        "pandas: Dataframes",
        "solana: Solana Python SDK",
        "solders: Solana core types"
       ]
      },
      {
       "title": "More in Jobs, queues and workflows",
       "path": "tools/jobs-workflows/",
       "items": [
        {
         "text": "Croner",
         "path": "tools/croner/"
        },
        {
         "text": "node-cron",
         "path": "tools/node-cron/"
        },
        {
         "text": "BullMQ",
         "path": "tools/bullmq/"
        },
        {
         "text": "Inngest",
         "path": "tools/inngest/"
        },
        {
         "text": "Socket.IO Redis Adapter",
         "path": "tools/socket-io-redis-adapter/"
        },
        {
         "text": "p-queue",
         "path": "tools/p-queue/"
        },
        {
         "text": "Workflow DevKit",
         "path": "tools/workflow/"
        },
        {
         "text": "amqplib",
         "path": "tools/amqplib/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "schedule",
       "me": true,
       "facts": [
        "MIT",
        "Gid 57",
        "1.5M/wk"
       ]
      },
      {
       "name": "APScheduler",
       "why": "In-process task scheduler with Cron-like capabilities for Python applications.",
       "path": "tools/apscheduler/",
       "facts": [
        "MIT",
        "Gid 66",
        "10.1M/wk"
       ]
      },
      {
       "name": "Celery",
       "why": "Distributed task queue for Python executing jobs asynchronously across workers.",
       "path": "tools/celery/",
       "facts": [
        "BSD-3-Clause",
        "Gid 70",
        "13.3M/wk"
       ]
      },
      {
       "name": "croniter",
       "why": "Cron expression parser and iterator for Python, schedule tasks with cron-like timing.",
       "path": "tools/croniter/",
       "facts": [
        "MIT",
        "Gid 55",
        "23.5M/wk"
       ]
      }
     ],
     "more": "Compare schedule with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "pip install schedule"
    },
    {
     "t": "h3",
     "text": "Rules for your agent"
    },
    {
     "t": "rules",
     "label": "Paste into AGENTS.md or CLAUDE.md",
     "text": "## schedule\n- Install with `pip install schedule`, then declare jobs with chains like `schedule.every(10).minutes.do(job)`.\n- Jobs only fire when `schedule.run_pending()` is called. Run it in a loop with `time.sleep(1)`, as the README does.\n- Pass job arguments through `.do()`, for example `.do(job_with_argument, name=\"Peter\")`.\n- For a time zone, pass it as the second argument to `.at()`, for example `.at(\"12:42\", \"Europe/Amsterdam\")`.\n- The scheduler does not account for job run time. Move long-running jobs off the main thread (see the docs' Parallel execution section).\n- 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.\n"
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "pypi schedule"
  ],
  [
   "Category",
   "Jobs, queues and workflows"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Latest version",
   "1.2.2, May 25, 2024"
  ],
  [
   "On GitHub since",
   "May 2013"
  ],
  [
   "Gid Score",
   "57.4"
  ],
  [
   "Rank in category",
   "#8 of 48"
  ],
  [
   "GitHub",
   "dbader/schedule"
  ],
  [
   "Last change",
   "May 25, 2024"
  ]
 ],
 "good": [],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/dbader.png"
}