Scheduled Tasks

Prerequisites: Before reading this guide, we recommend familiarizing yourself with Bot Management and Workflow Automation.

Scheduled tasks let you create timed jobs for a Bot, automatically executing tasks or triggering Workflows on a schedule.


Overview

Scheduled tasks address the following problem: many operations need to run periodically — checking server status daily, generating reports weekly, syncing data hourly. Triggering these manually is both tedious and easy to forget.

Scheduled tasks support two target types:

  • Task: Sends an instruction to the Bot on schedule; the Bot executes it autonomously
  • Workflow: Triggers a Workflow execution on schedule

Creating a Scheduled Task

  1. Navigate to the Bot detail page and select the Scheduled Tasks tab
  2. Click Create
  3. Fill in the configuration

Basic Configuration

FieldDescription
NameSchedule name (e.g., “Daily Health Check”)
FrequencyTiming rule (visual configurator or advanced Cron mode)
TimezoneReference timezone (Shanghai, UTC, New York, London)
InstructionThe instruction text sent to the Bot when the schedule fires

Frequency Configuration

The platform provides a visual frequency selector, so you don’t need to write Cron expressions manually. Select a frequency type and configure the time parameters as prompted.

Frequency Types

FrequencyConfigurationExample
HourlySelect minute (0-59)Execute at minute 30 of every hour
DailySelect hour + minuteExecute at 09:00 every day
WeeklyCheck days of the week + select hour + minuteExecute at 09:00 on Mon, Wed, Fri
MonthlySelect date + hour + minuteExecute at 00:00 on the 1st of every month

After configuration, the page displays in real time:

  • Frequency description: Auto-generated readable text (e.g., “Every day at 09:00”)
  • Next 3 execution times: Preview of upcoming execution times

Advanced Mode

If the preset frequencies don’t meet your needs, toggle the Advanced Mode switch to enter a standard 5-field Cron expression directly:

minute hour day month weekday

Common Cron examples:

Cron ExpressionMeaning
0 9 * * 1-5Weekdays at 9:00 AM
*/15 * * * *Every 15 minutes
0 */2 * * *Every 2 hours
0 9,18 * * *Every day at 9:00 and 18:00

You can switch between visual mode and advanced mode. If the Cron expression can be represented visually, switching to visual mode will automatically restore the configuration; otherwise, it will remain in advanced mode.

Target Type

Task mode (default):

Specify an instruction. When the schedule fires, the Bot will execute this instruction:

Check disk usage on all production servers, and send an alert if any exceed 80%.

Workflow mode:

Select an activated Workflow. When the schedule fires, the Workflow is executed automatically.


Managing Scheduled Tasks

Manage all scheduled tasks in the Scheduled Tasks tab on the Bot detail page.

Task List

The list displays the following for each scheduled task:

  • Name
  • Frequency: Readable frequency description (hover to see the raw Cron expression)
  • Instruction summary
  • Last execution time
  • Next execution time
  • Status: Enabled / Disabled

Actions

  • Enable/Disable: Toggle to pause or resume the schedule
  • Edit: Modify frequency, instruction, and other configuration
  • Delete: Remove the scheduled task
  • View execution history: View past execution records for this scheduled task

Execution History

Each schedule trigger records execution information:

  • Trigger time
  • Execution status (succeeded / failed)
  • Associated Task or Workflow Execution ID

Bot Self-Created Scheduled Tasks

If the self-created scheduled tasks feature is enabled in the Bot settings, the Bot can create, view, and delete scheduled tasks during conversations.

For example, a user can say in a conversation: “Create a scheduled task to check server status every day at 9 AM.” The Bot will invoke the built-in scheduling tools to create it.

Scheduled tasks created by the Bot also appear in the Scheduled Tasks tab on the Bot detail page.


Common Use Cases

Daily/Weekly Report Generation

  • Frequency: Weekly -> Monday through Friday -> 18:00
  • Instruction: Summarize today’s task execution results, generate a daily report, and send it to the #ops channel.

Server Health Checks

  • Frequency: Advanced mode */15 * * * * (every 15 minutes)
  • Instruction: Check CPU, memory, and disk usage on all production servers.

Triggering a Workflow on Schedule

  • Frequency: Daily -> 02:00
  • Target type: Workflow
  • Select Workflow: Data Backup Workflow

FAQ

Scheduled task didn’t fire

  • Confirm the scheduled task is in the “Enabled” state
  • Confirm the frequency configuration and timezone setting are correct
  • Confirm the Bot is active and not paused

Scheduled task execution failed

Check the failure reason in the execution history. Common causes include:

  • The Bot’s LLM provider configuration is invalid
  • Monthly budget has been exhausted
  • Bound Resource credentials have expired

How to set up a one-time task

The visual frequency selector does not support “run once”. Alternatives:

  • Use advanced mode to set a specific future time (e.g., 30 14 15 3 * = March 15 at 14:30), then manually disable it after execution
  • Use the API to create a Task directly, rather than going through scheduling