Use scheduled tasks in ChatOps Agent

Updated at:

Scheduled tasks in ChatOps Agent automatically perform O&M operations based on a schedule. Describe the recurring operation in natural language, and the system automatically calls the required tools or APIs at the specified time. You can also send the results to an IM group chat to automate routine tasks such as inspections and report generation.

Feature overview

  • Scheduled execution: Supports multiple schedule types, including daily, weekly, monthly, hourly, fixed-interval, and custom cron schedules.

  • Natural language configuration: Create a task by describing the recurring operation in natural language. No scripts are required.

  • Result notifications: Sends execution results to a configured IM group chat.

  • Execution history: Displays the status, start time, duration, and result of each task execution.

Prerequisites

  • CloudOps Orchestration Service (OOS) is activated.

  • A Resource Access Management (RAM) role is available for the scheduled task to call Alibaba Cloud APIs. If no role is available, click One-click Creation and Authorization when you create the task. This creates a service role that has permissions on commonly used cloud services.

  • Optional. To send execution results to an IM group chat, configure an IM channel on the IM Channels page.

Create a scheduled task

  1. Log on to the OOS console. In the left-side navigation pane, choose ChatOps Agent > Scheduled Tasks.

  2. Click Create Scheduled Task.

  3. Configure the following parameters and click Create.

    Parameter

    Required

    Description

    Task Name

    Yes

    Enter a task name that helps you identify the task in the task list.

    Schedule

    Yes

    Specify the recurrence and trigger time.

    What do you want AI-powered O&M to do?

    Yes

    Describe the recurring operation in natural language. For example: Use the ECS cost inspection skill to generate an inspection report.

    Send Messages to IM Software

    No

    If you select Yes, select an existing IM Configuration and a destination Group Chat. The task results are sent to the group chat. Only group chats in which a conversation occurred within the last 15 minutes can be selected.

    Authorized Role

    Yes

    The scheduled task assumes this RAM role to call Alibaba Cloud APIs. If no role is available, click One-click Creation and Authorization.

Schedule types:

Type

Description

Daily

Triggers the task at a specified time every day.

Weekly

Triggers the task at a specified time on the selected days of the week.

Monthly

Triggers the task at a specified time on a selected day of each month.

Hourly

Triggers the task at a specified minute of every hour.

Interval

Triggers the task repeatedly at a fixed hourly interval, such as every 2 hours.

Custom

Uses a five- or six-field cron expression to define a custom schedule. The minimum trigger interval is 30 minutes.

Manage scheduled tasks

On the Scheduled Tasks page, you can perform the following operations:

  • Find a task: Search for a task by task name, or select Show Enabled Only to display only enabled tasks.

  • View execution history: In the upper-right corner of the page, click Execution History and select a task to view its execution status, start time, duration, and result.