Home » AI Agents » Scheduled Agents

How to Set Up Scheduled AI Agents

Scheduled AI agents run automatically at set times without any manual trigger. You configure a schedule (every hour, once a day, specific days of the week), and the platform spawns the agent's workflow at each interval. Scheduled agents are ideal for monitoring, reporting, data cleanup, and any recurring task that benefits from AI analysis on a regular cycle.

What a Scheduled Agent Does

A scheduled agent runs the same workflow on a repeating timer. Unlike event-driven agents that respond to incoming data (a new email, a form submission, a webhook), scheduled agents initiate their own work cycle. At the scheduled time, the cron system spawns the agent's workflow, which then queries for new data, processes it with AI, and takes action.

The most common use case is batch processing. New records accumulate throughout the day, and a scheduled agent processes them all at once during off-peak hours. A data processing agent scheduled to run every night at 2 AM can classify hundreds of records without interfering with daytime operations.

Scheduled agents also handle monitoring tasks. A website monitoring agent that runs every 15 minutes checks for downtime and content changes. A server monitoring agent that runs hourly analyzes log files for anomalies. The schedule ensures consistent coverage without anyone needing to remember to run the check.

Setting Up the Schedule

Schedules use a time format that specifies the hour and minute. The hour can be a specific number (0-23 in EST), a range (8-19 for business hours), or a wildcard (*) for every hour. The minute is a specific two-digit number (00, 15, 30, 45).

Schedule Examples

Each account can turn scheduling on or off through the settings. When scheduling is turned off, no scheduled agents run for that account, but the schedule configuration is preserved so it can be re-enabled later.

Tracking State Between Runs

Because scheduled agents run repeatedly, they need to know what has already been processed. Without state tracking, the agent would reprocess the same data on every run, wasting credits and potentially sending duplicate notifications.

Timestamp-Based Tracking

The simplest approach is storing a "last run" timestamp. At the start of each run, the agent reads its state record from the database to find when it last ran. It then queries only for records created or modified after that timestamp. At the end of the run, it updates the state record with the current time.

Status Field Tracking

For record-level tracking, add a status field to each record. New records start with status "pending." The agent queries for pending records, processes each one, then updates the status to "completed" or "failed." On the next run, it queries for pending records again and only finds unprocessed ones.

Combining Both Methods

For maximum reliability, use both. The timestamp narrows the query range so the database scan is efficient, and the status field ensures no individual record is processed twice even if the agent's previous run was interrupted. This pattern is especially important for agents that process financial data or send customer notifications where duplicates cause real problems.

Common Scheduling Patterns

Daily Summary Agent

Runs once per day (typically early morning). Queries the previous day's data, sends it to the AI for summarization, and delivers a digest via email or SMS. Works well for sales reports, support ticket summaries, and activity logs. Use GPT-4.1-mini (about 4 credits per call) for generating readable summaries.

Hourly Monitor Agent

Runs every hour. Checks for specific conditions (website down, error rate spike, inventory low) and sends alerts only when a problem is detected. Most runs find nothing and cost only the database query. When the AI is called (on anomaly detection), it provides context about the issue. Use GPT-5-nano (about 1 credit) for simple threshold checks, GPT-4.1-mini for more nuanced analysis.

Business Hours Processing Agent

Runs every 15 or 30 minutes during business hours (8 AM - 6 PM). Processes incoming leads, support tickets, or orders in near-real-time during the workday, then pauses overnight. This balances responsiveness with cost, since running every minute would be expensive for tasks that can wait a few minutes.

Weekly Cleanup Agent

Runs once per week (Sunday night or Monday morning). Identifies stale records, archives old conversations, generates weekly metrics, and sends a summary report. The AI reviews the week's data patterns and highlights trends. Schedule it during low-traffic hours to minimize any performance impact.

Multi-Timezone Agent

For businesses serving customers across time zones, schedule the agent to run at the start of each major timezone's business day. Three schedule entries at 8 AM EST, 8 AM CST, and 8 AM PST ensure customers get processed at the appropriate local time. The workflow uses conditional logic to filter records by timezone.

Managing Costs for Recurring Agents

Scheduled agents can accumulate significant costs because they run repeatedly. An agent that costs 10 credits per run and runs every hour costs 240 credits per day, or about 7,200 credits per month ($7.20). Planning your schedule frequency and model choice carefully keeps costs reasonable.

Cost Reduction Strategies

Handling Failures in Scheduled Runs

When a scheduled agent fails partway through, the next scheduled run needs to pick up where it left off. This is why state tracking matters: if the agent updates each record's status as it processes, a partial failure leaves some records as "completed" and others still "pending." The next run processes only the pending ones.

Common failure scenarios for scheduled agents include API timeouts when calling external services, database throttling during high-traffic periods, and AI model rate limits when processing large batches. Add error handling branches to your workflow for each of these cases.

For critical agents (those processing payments, sending customer communications, or updating inventory), add a monitoring layer. The agent writes its completion status and record count to a log table. A separate lightweight monitor checks that the agent completed successfully and sends an alert if it did not run or if it processed fewer records than expected.

Reliability tip: Set your scheduled agent to write a "heartbeat" record at the start and end of each run. If the end heartbeat is missing, you know the run failed. This is cheaper and simpler than building full monitoring infrastructure.

Step-by-Step: Create a Scheduled Agent

Step 1: Build the workflow first. Create your agent workflow in Chain Commands and test it manually with sample data. Make sure every step works correctly before adding a schedule. A scheduled agent with bugs will repeat those bugs on every run.
Step 2: Add state tracking. Add a database read at the start of the workflow that checks the agent's last run timestamp or queries for unprocessed records. Add a database write at the end that updates the timestamp or marks records as processed. Test the workflow twice manually to confirm it does not reprocess records.
Step 3: Add an empty-data check. After the initial database query, add a conditional step that checks whether any records were returned. If the result is empty, end the workflow immediately. This prevents unnecessary AI calls on runs where no new data exists.
Step 4: Configure the schedule. Set the hour and minute values in the app schedule configuration. Start with a conservative frequency (once or twice daily) and increase it only after you have confirmed the agent works reliably and the costs are acceptable.
Step 5: Enable scheduling. Turn on the schedule status in your account settings. The cron system will now spawn your agent's workflow at each scheduled interval. Monitor the first few runs by checking the output logs to confirm everything works as expected.
Step 6: Monitor and adjust. After a week of scheduled runs, review the costs, processing times, and error rates. Adjust the schedule frequency, model choice, or batch size based on what you observe. If the agent runs hourly but only finds new data a few times per day, switch to running every 4-6 hours.

Set up AI agents that run on autopilot with configurable schedules. No coding required.

Get Started Free