Skip to content

Scenario: Scheduled Tasks & Automation Workflows ​

When you schedule recurring tasks, the agent executes them at the specified times or intervals. The agent handles daily news summaries, weekly reports, and regular file cleanup automatically.


🎯 Objectives ​

  • Automate daily and weekly recurring tasks with a single setup.
  • Generate reports, summaries, and maintenance jobs without manual checks.
  • Build multi-agent automation workflows across distributed sessions.

📋 Step-by-Step Guide ​

Step 1: Define Tasks to Automate ​

Identify your recurring tasks clearly. Set daily, weekly, or monthly intervals.

Daily task examples:

- Every day at 09:00: Summarize top 10 AI news articles.
- Every day at 18:00: Summarize incoming emails received today.
- Every day at 00:00: Clean up the downloads folder.

Weekly task examples:

- Every Monday at 10:00: Generate the weekly project report.
- Every Friday at 17:00: Summarize meeting notes from this week.

Monthly task examples:

- On the 1st of every month: Generate the monthly sales report.
- On the last Friday of every month: Organize the code review schedule.

Step 2: Instruct and Schedule the Agent ​

Provide the task details and the schedule frequency to the agent.

Basic schedule request:

Schedule the following task every day at 09:00:
- Search for 10 recent AI news articles.
- Generate a one-line summary for each article.
- Include source links.
- Save results to 'daily-reports/ai-news-{date}.md'.

Complex schedule request:

Run the following workflow every Monday at 10:00:
1. Check Git commit logs from the previous week.
2. Summarize key changes.
3. Organize contributions by team member.
4. Save the weekly report to 'weekly-reports/weekly-{date}.md'.

Multi-agent coordination:

Configure this multi-agent automation pipeline:
- Daily at 08:00: Ask 'Research Agent' for an AI news report.
- Daily at 09:00: Ask 'Translation Agent' to translate the report into Korean.
- Daily at 10:00: Save the final report to 'reports/ko/'.

Step 3: Inspect and Update Schedules ​

You can view active tasks and modify them at any time.

List active tasks:

Show all currently scheduled automation tasks.
Summarize the execution time and content for each task.

(The agent calls scheduled_task__list automatically to inspect active jobs.)

Modify a schedule:

Change the execution time of the daily 09:00 AI news report to 14:00.

Pause or remove a schedule:

Pause the weekly Monday report schedule temporarily.

(To remove an existing task completely, the agent uses scheduled_task__delete.)

Step 4: Verify Task Execution ​

Inspect the outputs generated by the automated agent.

Request verification:

Check all automated reports generated during the past week.
Summarize which reports were created.

Check error reports:

Check if any automated tasks failed recently.
If a task failed, show the root cause and the recommended fix.

💡 Example Prompt Collection ​

PurposePrompt
Daily news summary"Summarize top 10 AI news articles daily at 09:00 with source links."
Weekly report"Generate a weekly Git commit analysis report every Monday at 10:00."
File cleanup"Find and remove duplicate files in ./downloads/ every Friday at 17:00."
Email summary"Summarize all incoming emails daily at 08:00."
Data backup"Create a backup of ./data/ into ./backups/ every midnight."
Review reminder"Send a reminder for pending code reviews every Wednesday at 15:00."
System monitoring"Check system resource usage hourly and notify if it exceeds 80%."
Learning report"Generate a summary report of topics learned this week every Sunday at 18:00."

⏰ Schedule Frequency Guide ​

Daily Execution ​

Best suited for:

  • News summaries and daily status reports.
  • Routine file cleanup and local backups.
  • Email and inbox notifications triage.

Example prompt:

Execute the following task every day at 09:00 UTC:
1. Search for 10 recent AI news articles.
2. Provide a one-line summary for each article.
3. Save results to daily-reports/{date}.md.

Weekly Execution ​

Best suited for:

  • Weekly status reports and Git commit analytics.
  • Meeting minutes consolidation.
  • Weekly metric and KPI dashboards.

Example prompt:

Run this task every Monday at 10:00:
1. Review Git commits from last week.
2. Summarize key modifications.
3. Save the report to weekly-reports/.

Monthly Execution ​

Best suited for:

  • Monthly sales and performance reviews.
  • Code quality and technical debt assessments.
  • System audit checks.

Example prompt:

Run this task on the 1st of every month at 10:00:
1. Collect Git statistics from the past month.
2. Generate the monthly overview report.
3. Include member contribution breakdown.

Interval Execution ​

Best suited for:

  • Continuous service monitoring.
  • Periodic error log inspection.
  • Database and cache synchronization.

Example prompt:

Check the following items every hour at minute 0:
- Web service response latency.
- Recent error log spikes.
- Send an alert if anomalies are detected.

⚙️ Configuration Tips ​

Create a Dedicated Automation Assistant ​

Use a dedicated agent profile for automated tasks:

  1. Open /assistants and select New Assistant.
  2. Name: "Automation Assistant" or "Scheduled Agent".
  3. System prompt:
    You are an automated task execution assistant.
    Execute scheduled jobs accurately and quickly.
    Record results clearly and report root causes upon failure.
  4. Enable only the required tools to minimize cognitive overhead.

Configure Failure Policies ​

Define error handling behavior explicitly:

When running automated tasks:
- Save error details to 'errors/' if a failure occurs.
- Provide a summary of failed tasks every morning.
- Send an urgent notification if critical tasks fail.

Resource Management ​

Prevent excessive concurrent background tasks:

When setting up automated tasks:
- Distribute schedules across different time slots.
- Schedule heavy CPU or memory jobs during off-peak hours.
- Limit concurrent active tasks to a maximum of 3.

📊 Automation Dashboard ​

You can ask the agent to summarize all active automation jobs in a structured dashboard:

Show all configured automation tasks in a dashboard table:
- Task Name
- Schedule Interval / Cron
- Last Run Time
- Recent Failure Status
- Next Scheduled Run


🚀 Next Steps ​

ProjectDescriptionDifficulty
Daily News DigestSummarize AI news every morning⭐⭐
Weekly Git ReportGenerate weekly commit analytics⭐⭐⭐
Automated CleanupClean downloads directory on schedule⭐⭐
Email SummarySummarize daily morning emails⭐⭐
Automated BackupConfigure periodic data directory backups⭐⭐
Multi-Agent PipelineConnect multiple agents into one pipeline⭐⭐⭐⭐
Failure NotificationsReceive instant alerts on job errors⭐⭐
Automation MonitorBuild a status dashboard for tasks⭐⭐⭐

Released under the MIT License.