# Cron 与调度

调度是一项一等公民能力，而不是变通方案。代理可以设置周期性任务（“每个工作日早上 9 点，帮我总结收件箱”）、一次性提醒（“三小时后提醒我这件事”），以及按 cron 计划运行的任意代理任务。

## 该家族中的工具

| 工具            | 它的作用                           |
| ------------- | ------------------------------ |
| `cron_add`    | 创建一个新的计划任务 - cron 表达式 + 代理提示词。 |
| `cron_list`   | 列出现有任务及其下一次运行时间。               |
| `cron_update` | 编辑现有任务 - 更改计划、提示词或启用状态。        |
| `cron_remove` | 删除一个任务。                        |
| `cron_run`    | 立即运行一次任务，不管其计划如何。              |
| `cron_runs`   | 查看最近的运行历史 - 何时运行、耗时多久、产出了什么。   |

还有一个一次性 `schedule` 工具在 [系统与实用工具](/openhuman/zh/gong-neng/native-tools/system-and-utilities.md) 用于“在时间 T 执行一次此操作”这类不需要周期性条目的场景。

## 它的适用场景

* 每日 / 每周摘要发送到你选择的消息频道。
* 轮询一个不会推送事件的缓慢集成。
* 由代理本身负责的提醒（“周四提醒我跟进艾丽丝”）。
* 周期性研究 - “每周一检查这个主题有什么新内容，并给我写一份简报”。

## 它如何与其他部分关联

每次 cron 运行都只是一次普通的代理调用，因此它可以使用任何其他工具 - 搜索网页，查询 [记忆树](/openhuman/zh/gong-neng/obsidian-wiki/memory-tree.md)，调用一个 [第三方集成](/openhuman/zh/gong-neng/integrations.md)，发送消息。运行历史会被记录下来，所以你可以看到每个时刻产生了什么。

## 另见

* [系统与实用工具](/openhuman/zh/gong-neng/native-tools/system-and-utilities.md) - 一次性 `schedule` 工具。
* [代理协同](/openhuman/zh/gong-neng/native-tools/agent-coordination.md) - 适用于会分发到子代理的任务。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tinyhumans.gitbook.io/openhuman/zh/gong-neng/native-tools/cron.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
