> ## Documentation Index
> Fetch the complete documentation index at: https://developer.watson-orchestrate.ibm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scheduler (Public Preview)

Agentic workflow includes a built-in business scheduler. You can use it to schedule a agentic workflow or an agent to run at a later time.

Many business scenarios require schedule execution. For example:

<Tabs>
  <Tab title="Example 1">
    ```text TEXT theme={null}
    Schedule this Helpdesk monitoring agentic workflow to run every weekday at 7 AM.
    ```
  </Tab>

  <Tab title="Example 2">
    ```text TEXT theme={null}
    Run this monitoring tool every hour for the next 24 hours.
    ```
  </Tab>

  <Tab title="Example 3">
    ```text TEXT theme={null}
    Schedule the stock_analysis_agent to run every day at 7 AM UK time with the ticker symbol IBM.
    ```
  </Tab>
</Tabs>

<Expandable title="supported features">
  * Schedule repeated runs of agentic workflow and Agents using the `agent_run` tool at specific times, dates, and repetition limits.
  * Always specify a timezone when creating a schedule. If no timezone is provided, the system uses UTC by default.
  * Define time patterns using natural language, such as "every day at 7am UK time" or "every Saturday at 5pm PST." The system automatically converts these phrases into the correct cron expressions.
  * To avoid schedule overruns, the system defaults to one repetition if none is specified. Each schedule allows up to 100 repetitions. This limit cannot be changed at the moment.
  * Only schedule agents or agentic workflow that can run without user interaction, since scheduled runs may occur when no user is available. User notifications are not yet supported.
  * Create multiple schedules for the same agentic workflow or agent as needed.
  * Use the `i__get_flow_status_intrinsic_tool__` tool to check the status of a agentic workflow run.
  * Use the `i__get_schedule_intrinsic_tool__` tool to view available schedules.
  * Use the `i__delete_schedule_intrinsic_tool__` tool to remove a schedule.
</Expandable>

### Scheduling a agentic workflow

To make a agentic workflow schedulable, enable the `schedulable` option in the `@flow` decorator:

```py Python theme={null}
@flow(
        name = "alert_helpdesk_flow",
        input_schema=Product,
        output_schema=Message,
        schedulable=True
    )
```

After enabling this option, you can schedule the agentic workflow using a natural language command like:

```text TEXT theme={null}
I want to schedule a call to alert_helpdesk_floeryday at 7am EST for 3 days
```

### Scheduling an agent

Agents aren’t directly schedulable. Instead, use the `agent_run` tool to schedule an agent with a request.

First, add the tool to an agent. For more information, see [agent\_scheduler](https://github.com/IBM/ibm-watsonx-orchestrate-adk/tree/main/examples/flow_builder/agent_scheduler).

The `agent_run` tool is a agentic workflow with a single agent node that calls the specified agent with a request. After adding the tool, schedule the agent like this:

```text TEXT theme={null}
I want to schedule agent "<agent id>" to run every day at 9 AM.
```
