mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-03-18 12:40:06 +08:00
feat: docs update
This commit is contained in:
42
docs/tools/scheduler.mdx
Normal file
42
docs/tools/scheduler.mdx
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: scheduler - 定时任务
|
||||
description: 创建和管理定时任务
|
||||
---
|
||||
|
||||
# scheduler
|
||||
|
||||
创建和管理动态定时任务,支持灵活的调度方式和执行模式。
|
||||
|
||||
## 依赖
|
||||
|
||||
| 依赖 | 安装命令 |
|
||||
| --- | --- |
|
||||
| `croniter` ≥ 2.0.0 | `pip install croniter>=2.0.0` |
|
||||
|
||||
安装核心依赖时已包含:`pip3 install -r requirements.txt`
|
||||
|
||||
## 调度方式
|
||||
|
||||
| 方式 | 说明 |
|
||||
| --- | --- |
|
||||
| 一次性任务 | 在指定时间执行一次 |
|
||||
| 固定间隔 | 按固定时间间隔重复执行 |
|
||||
| Cron 表达式 | 使用 Cron 语法定义复杂调度规则 |
|
||||
|
||||
## 执行模式
|
||||
|
||||
- **固定消息发送**:到达触发时间时发送预设消息
|
||||
- **Agent 动态任务**:到达触发时间时由 Agent 智能执行任务
|
||||
|
||||
## 使用方式
|
||||
|
||||
通过自然语言即可创建和管理定时任务:
|
||||
|
||||
- "每天早上 9 点给我发天气预报"
|
||||
- "每隔 2 小时检查一下服务器状态"
|
||||
- "明天下午 3 点提醒我开会"
|
||||
- "查看所有定时任务"
|
||||
|
||||
<Frame>
|
||||
<img src="https://cdn.link-ai.tech/doc/20260202195402.png" width="800" />
|
||||
</Frame>
|
||||
Reference in New Issue
Block a user