> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-docs-align-with-readme.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Scheduler

> Let agents create and manage recurring schedules through natural language.

`SchedulerTools` gives an agent natural-language control over the [AgentOS Scheduler](/agent-os/scheduler/overview). It wraps `ScheduleManager` so an agent can create, list, enable, disable, and delete cron-based schedules in response to prompts like *"Run a daily health check at 9am"*.

## Prerequisites

Install the scheduler extras:

```shell theme={null}
uv pip install "agno[scheduler]"
```

`SchedulerTools` persists schedules to the same database your AgentOS uses. For scheduled tasks to actually execute, run an AgentOS instance with `scheduler=True` pointed at that database. See the [Scheduler overview](/agent-os/scheduler/overview) for the AgentOS setup.

## Example

```python cookbook/05_agent_os/scheduler/scheduler_tools_agent.py theme={null}
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.scheduler import SchedulerTools

agent = Agent(
    model=OpenAIChat(id="gpt-4o"),
    tools=[
        SchedulerTools(
            db=scheduler_db,
            default_endpoint="/agents/my-agent/runs",
        )
    ],
)

agent.print_response("Run a health check every morning at 9am.")
```

Re-creating a schedule with the same name updates it instead of erroring (`if_exists="update"`).

## Toolkit Params

| Parameter          | Type             | Default  | Description                                         |
| ------------------ | ---------------- | -------- | --------------------------------------------------- |
| `db`               | `Any`            | -        | Database adapter implementing scheduler methods     |
| `default_endpoint` | `Optional[str]`  | `None`   | Default API endpoint to invoke on each run          |
| `default_method`   | `str`            | `"POST"` | HTTP method for scheduled requests                  |
| `default_timezone` | `str`            | `"UTC"`  | Timezone used for cron expressions                  |
| `default_payload`  | `Optional[Dict]` | `None`   | Default request payload (e.g. `{"message": "..."}`) |

## Toolkit Functions

| Function            | Description                                        |
| ------------------- | -------------------------------------------------- |
| `create_schedule`   | Create a recurring schedule from a cron expression |
| `list_schedules`    | List existing schedules                            |
| `get_schedule`      | Fetch a schedule by ID                             |
| `delete_schedule`   | Permanently remove a schedule                      |
| `enable_schedule`   | Activate a disabled schedule                       |
| `disable_schedule`  | Pause a schedule without deleting it               |
| `get_schedule_runs` | Retrieve execution history for a schedule          |

All functions have sync and async variants.

## Developer Resources

* [Tools source](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/scheduler.py)
* [Cookbook example](https://github.com/agno-agi/agno/blob/main/cookbook/05_agent_os/scheduler/scheduler_tools_agent.py)
* [Scheduler overview](/agent-os/scheduler/overview)
