Scheduled Tasks
A scheduled task is an automated way to trigger a new session with a given prompt at predefined times—much like a cron job, but purpose-built for your agentic workflows.
Scheduled tasks enable you to run agents automatically on a recurring schedule, whether that's hourly, daily, or on any time-based interval. Each workflow can have one or more scheduled tasks defined. When triggered, a scheduled task injects a prompt into a session for a specific agent.
Example: Creating a Scheduled Task
Scheduled tasks can be managed via the Chariot CLI, using a JSON request body. For example:
{
"name": "Price Drop Detector",
"toAgent": "Flight Lookup Agent",
"prompt": "Check for price drops on flights from LAX to LGA.",
"active": true,
"schedule": "24h",
"expiresIn": "720h",
"expiresAt": null
}
What this does:
This scheduled task instructs the Flight Lookup Agent (a service agent) to check for price drops on flights between Los Angeles (LAX) and New York (LGA) every 24 hours. By setting expiresIn to 720h, the task remains active for 30 days.
Why Use Scheduled Tasks?
Scheduled tasks are ideal for cases where you want agents to perform recurring, automated work. Common scenarios include:
- Monitoring data changes or external conditions (such as price drop alerts or time-based summaries)
- Running daily reports or scheduled validations
- Sending periodic notifications
Scheduled tasks that require user input will wait for two minutes before being canceled. Further scheduled tasks will be blocked during this time. If user input is not received, that scheduled task will be canceled, and the next one will be delivered on its normal schedule.