This topic uses daily inspection as an example to describe how to create a scheduled task.
Prerequisites
You have configured the product connection for the target cluster. For more information, see Create a product connection.
You have confirmed that the required skill (such as
cluster_inspection) is enabled on the Skills page.
Create a scheduled task on the Scheduled Tasks page
In the left-side navigation pane, click Scheduled Tasks to go to the Scheduled Tasks page. Then, click Create Task in the upper-right corner.
Enter the Task Name, for example, "Daily Cluster Inspection". The Description is optional and can be used to provide additional information about the task.
Select the Task Type and complete the corresponding configuration for the selected type.
Agent tasks are automatically executed at the scheduled time according to the instructions in the task content. They are suitable for automatic analysis scenarios such as inspections and diagnostics:
Enter the Task Content. The agent will execute according to this instruction. In this example, enter "Inspect the ob_zone1 cluster and generate an inspection report".
Specify the Execution Agent (optional), for example,
ops-agent. If left empty, the default agent is used.Select the Scheduling Method:
Scheduling MethodDescriptionEvery Repeat at fixed intervals, for example, every hour. Daily Execute at a fixed time every day. Cron Expression Specify the execution time using a Cron expression and select a timezone. For example, 0 14 * * *with timezoneAsia/Shanghaimeans execute at 14:00 every day.At Specified Time Execute at the specified time. Select the Execution Mode (optional): whether the agent task is executed in an independent session or a bound session.
Configure Result Push (optional):
- Push Summary to Chat: Select the specific DingTalk, Lark, or WeCom chat where the task result should be pushed, and the corresponding chatbot will deliver it.
- Do Not Push: View the result only within the platform.
- Regardless of whether pushed or not, the execution result is always retained in the execution history.
Configure Advanced Settings as needed (optional):
- Model Coverage: The model used for this task, in the format
provider/model. - Timeout period (seconds): The maximum timeout period for task execution.
- Model Coverage: The model used for this task, in the format
Optionally, select Enable Immediately After Creation, then click Create to save.
After saving, the system periodically triggers task execution according to the configured scheduling method and records the results in Execution History.
The task content is pushed as a system event to the primary session, making it suitable for periodic reminders:
Enter Task Content, which is the specific content of the reminder, as a system event pushed to the primary session. The length must not exceed 4000 characters.
Select Scheduling Method (Every / Daily / Cron Expression / Specified Time). The configuration methods for each are consistent with the table on the "Agent Execution" tab.
Optionally, select Enable Immediately After Creation, then click Create to save. When the scheduled time arrives, the reminder content is pushed to the primary session.
Note
Primary session reminders do not invoke an agent, so you do not need to configure the execution agent, runtime mode, result push, or advanced settings.
Create via Dialog
Describe the task requirements directly in the session, and the agent will use the built-in scheduled task tool to complete the creation. For example:
Inspect the ob_zone1 cluster at 14:00 every day and push the results to me.
You can also click the shortcut Create Scheduled Task on the Create Dialog page. The system fills in the question template, and you can then add the cluster and time.
Note
Tasks created via dialog also appear in the task list on the Scheduled Tasks page, where you can edit, pause, or delete them.
What to do next
Click Execute Now in the task's Actions column to verify whether the task can properly generate inspection results.
View the inspection report on the Execution History tab and compare it with historical results to identify trends in metric degradation.