Schedules
Schedules enable agents to run automatically at specified times. Whether it's a daily report, hourly sync, or weekly cleanup, schedules handle the timing.
For full documentation, see Schedules (Full Guide).
Quick Overview
Why Schedules?
Automate recurring work without manual intervention:
- Daily reports: Generate summaries every morning
- Data sync: Keep systems in sync hourly
- Maintenance: Weekly cleanup and optimization
- Monitoring: Check system health every 5 minutes
Basic Examples
// Every hour
const schedule = await client.schedules.create({
name: 'Hourly Sync',
agentId: 'agent-123',
frequency: 'hourly',
input: { syncType: 'incremental' }
});
// Every day at midnight
const schedule = await client.schedules.create({
name: 'Daily Report',
agentId: 'agent-123',
frequency: 'daily',
timezone: 'America/New_York'
});
Cron Expression
For complex schedules, use cron syntax:
const schedule = await client.schedules.create({
name: 'Weekdays at 9 AM',
agentId: 'agent-123',
frequency: 'cron',
cron: '0 9 * * 1-5',
timezone: 'America/New_York'
});
Cron Reference
| Pattern | Description |
|---|---|
* * * * * | Every minute |
0 * * * * | Every hour |
0 0 * * * | Every day at midnight |
0 9 * * 1-5 | Weekdays at 9 AM |
*/15 * * * * | Every 15 minutes |
Full documentation: Schedules (Complete Guide)