Skip to main content
Run agents automatically on a schedule using agentuse serve. Configure schedules in agent frontmatter with cron expressions or intervals.

Quick Start

  1. Add a schedule config to your agent:
  1. Start the server:
The server displays scheduled agents on startup:

Schedule Formats

The schedule field accepts a single string value. The format is auto-detected:

Intervals

Simple duration format for recurring tasks:
Supported units:
For daily or longer schedules, use cron expressions.

Cron Expressions

Standard cron syntax for precise control:
Common patterns:
Use crontab.guru to build and validate cron expressions.

Timezone

Cron expressions and intervals are evaluated in the local timezone of the machine running agentuse serve, not UTC. The times you write are literal wall-clock times for that server. Daylight saving transitions are handled automatically, so 0 9 * * 1-5 stays at 9am local across the year. To pin a schedule to a specific zone, run the server with TZ set (for example TZ=UTC agentuse serve or TZ=America/New_York agentuse serve).

Example

A scheduled agent for daily reports:
Use cheaper models like openrouter:minimax/minimax-m3 for frequent, straightforward tasks (health checks, simple monitoring). Reserve claude-sonnet-4-6 and claude-opus-4-8 for complex creative tasks.

Server Options

See CLI Commands - agentuse serve for all server options including port, host, and authentication configuration.

Monitoring

The server logs each scheduled execution:
Enable debug mode for detailed logs:

Scheduler Ownership and Recovery

Only one agentuse serve process arms schedules for a project. The daemon records that ownership in .agentuse/scheduler.lock; other daemons keep serving the project but skip its schedules to prevent duplicate side effects. Lock and filesystem errors fail closed: AgentUse skips schedules rather than risking two daemons running them. A stale daemon lock is reclaimed automatically. Reclamation itself uses the short-lived .agentuse/scheduler.lock.reclaim guard. If a process is killed during that critical section, the guard can be left behind and scheduling stays disabled. After confirming no daemon is currently reclaiming the lock, remove .agentuse/scheduler.lock.reclaim, then touch an agent file or restart agentuse serve. The warning prints the exact file path to remove.

Next Steps

Webhooks

Trigger agents via HTTP

Self-Hosting

Deploy in production