# Scheduled Agent

> Run the agent on a fixed schedule independent of user requests.

- **Category**: Agentic AI
- **Subcategory**: Planning & Control Flow
- **Canonical URL**: https://designpattern.fyi/patterns/scheduled_agent/

---

## Description
**Intent**: Run the agent on a fixed schedule independent of user requests.
**Context**: A team needs an agent to do work on a clock — produce an overnight summary, triage incoming issues every Monday morning, run an hourly health check, send a daily competitive-intelligence digest. The work has to happen whether or not a user remembers to ask. A scheduler and durable storage for the agent's state are available.
**Solution**: - Schedule the agent run at a fixed cadence (cron, scheduler service, delayed queue). - The agent reads its current persisted state, executes its task, writes results, and exits. - State persists across runs in durable storage so each run picks up where the last one left off. - Design runs to be idempotent so retries are safe.


## Use Cases
- A task should run periodically regardless of user prompting.
- Agent state can be persisted in durable storage between runs.
- A scheduler (cron, queue, scheduler service) is available.





## Trade-offs


### Advantages

- Time-bounded tasks happen reliably without user intervention.

- Idempotent runs make retries safe.




### Considerations & Drawbacks

- Cost per run regardless of whether meaningful new work exists.

- Skew between expected and actual cadence if the scheduler drifts.







---
**Reference**: [Original Source](https://www.agentpatternscatalog.org/patterns/scheduled-agent/)

