> ## Documentation Index
> Fetch the complete documentation index at: https://manus.im/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 定时任务

> 自动化重复性工作——按计划或在特定时间运行任务

export const CodePrompt = ({children}) => {
  const [isCopied, setIsCopied] = useState(false);
  const textContent = useMemo(() => {
    const extractText = (children, depth = 0) => {
      const maxDepth = 10;
      if (depth > maxDepth) return '';
      if (children == null) return '';
      if (typeof children === 'string' || typeof children === 'number') {
        return String(children);
      }
      if (Array.isArray(children)) {
        return children.map(child => extractText(child, depth + 1)).join('');
      }
      if (typeof children === 'object' && children.props) {
        return extractText(children.props.children, depth + 1);
      }
      return '';
    };
    return extractText(children);
  }, [children]);
  const handleAskManus = useCallback(() => {
    const url = new URL('https://manus.im');
    if (textContent) {
      url.searchParams.set('q', textContent);
      url.searchParams.set('submit', '1');
    }
    window.open(url.toString(), '_blank');
  }, [textContent]);
  const handleCopy = useCallback(async () => {
    try {
      await navigator.clipboard.writeText(textContent);
      setIsCopied(true);
      setTimeout(() => {
        setIsCopied(false);
      }, 2000);
    } catch (err) {
      const textArea = document.createElement('textarea');
      textArea.value = textContent;
      textArea.style.position = 'fixed';
      textArea.style.opacity = '0';
      document.body.appendChild(textArea);
      textArea.select();
      try {
        document.execCommand('copy');
        setIsCopied(true);
        setTimeout(() => {
          setIsCopied(false);
        }, 2000);
      } catch (fallbackErr) {
        console.error(fallbackErr);
      }
      document.body.removeChild(textArea);
    }
  }, [textContent]);
  return <div className="code-block mt-5 mb-8 not-prose rounded-2xl relative group text-gray-950 dark:text-gray-50 codeblock-light border border-gray-950/10 dark:border-white/10 dark:twoslash-dark bg-transparent dark:bg-transparent">
      <div className="absolute top-3 right-4 flex items-center gap-1.5">
        <div className="z-10 relative">
          <button onClick={handleCopy} className="h-[26px] w-[26px] flex items-center justify-center rounded-md backdrop-blur peer group/copy-button " data-testid="copy-code-button" aria-label="Copy the contents from the code block">
            {isCopied ? <svg width="16" height="11" viewBox="0 0 16 11" fill="none" xmlns="http://www.w3.org/2000/svg" class="fill-primary dark:fill-primary-light">
                <path d="M14.7813 1.21873C15.0751 1.51248 15.0751 1.98748 14.7813 2.2781L6.53135 10.5312C6.2376 10.825 5.7626 10.825 5.47197 10.5312L1.21885 6.28123C0.925098 5.98748 0.925098 5.51248 1.21885 5.22185C1.5126 4.93123 1.9876 4.9281 2.27822 5.22185L5.99697 8.9406L13.7188 1.21873C14.0126 0.924976 14.4876 0.924976 14.7782 1.21873H14.7813Z"></path>
              </svg> : <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg" className="w-4 h-4 text-gray-400 group-hover/copy-button:text-gray-500 dark:text-white/40 dark:group-hover/copy-button:text-white/60">
                <path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round"></path>
                <path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round"></path>
              </svg>}
          </button>
          <div aria-hidden="true" className="absolute top-11 left-1/2 transform whitespace-nowrap -translate-x-1/2 -translate-y-1/2 peer-hover:opacity-100 opacity-0 text-white rounded-lg px-1.5 py-0.5 text-xs bg-primary-dark">
            {isCopied ? 'Copied' : 'Copy'}
          </div>
        </div>
        <div className="z-10 relative">
          <button onClick={handleAskManus} className="h-[26px] w-[26px] flex items-center justify-center rounded-md backdrop-blur peer group/ask-manus " id="ask-ai-code-block-button" aria-label="Ask Manus">
            <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" className="w-4 h-4 text-gray-400 group-hover/ask-manus:text-gray-500 dark:text-white/40 dark:group-hover/ask-manus:text-white/60">
              <path d="M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" />
              <path d="M12 8v6" />
              <path d="M9 11h6" />
            </svg>
          </button>
          <div aria-hidden="true" className="absolute top-11 left-1/2 transform whitespace-nowrap -translate-x-1/2 -translate-y-1/2 peer-hover:opacity-100 opacity-0 text-white rounded-lg px-1.5 py-0.5 text-xs bg-primary-dark">
            Ask Manus
          </div>
        </div>
      </div>

      <div className="w-0 min-w-full max-w-full py-3.5 px-4 h-full dark:bg-codeblock relative text-sm leading-6 children:!my-0 children:!shadow-none children:!bg-transparent transition-[height] duration-300 ease-in-out code-block-background [&_*]:ring-0 [&_*]:outline-0 [&_*]:focus:ring-0 [&_*]:focus:outline-0 [&_pre>code]:pr-[3rem] [&_pre>code>span.line-highlight]:min-w-[calc(100%+3rem)] [&_pre>code>span.line-diff]:min-w-[calc(100%+3rem)] rounded-2xl bg-white overflow-x-auto scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-black/15 hover:scrollbar-thumb-black/20 active:scrollbar-thumb-black/20 dark:scrollbar-thumb-white/20 dark:hover:scrollbar-thumb-white/25 dark:active:scrollbar-thumb-white/25" style={{
    fontVariantLigatures: 'none',
    height: 'auto',
    backgroundColor: 'rgb(255, 255, 255)'
  }}>
        <div className="font-mono whitespace-pre leading-6">{children}</div>
      </div>
    </div>;
};

定时任务允许您通过让 Manus 按计划执行任务来自动化重复性工作。设置一次，Manus 就会自动处理——每日报告、每周研究、每月分析或任何重复性工作流。

<iframe src="https://www.youtube.com/embed/X1z7ZgXm1Lo" title="YouTube 视频播放器" frameborder="0" className="w-full aspect-video rounded-xl" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen />

## 快速入门

### 一次性任务

<CodePrompt>
  "明天上午 9 点运行此任务：研究过去 24 小时内的热门 AI 新闻
  并向我发送摘要"
</CodePrompt>

### 重复性任务

<CodePrompt>
  "每周一上午 8 点，研究我们的前 5 名竞争对手，并向我发送
  a summary of any product updates or news from the past week"
</CodePrompt>

### 复杂计划

<CodePrompt>
  "每月 1 号，分析我们的网站流量数据，
  创建包含关键见解的报告，并将其发布到我们的 Notion 数据库
</CodePrompt>

## 何时使用定时任务

用于：

* **重复性研究** (每日新闻摘要、每周竞争对手更新)
* **定期报告** (每月分析、每周绩效摘要)
* **周期性数据收集** (抓取价格、跟踪提及)
* **自动化监控** (检查更新、跟踪变化)

不用于：

* 您现在需要的临时任务（只需正常运行即可）
* 实时监控（定时任务在特定时间运行，而不是持续运行）

## 快速示例

### 示例 1：每日新闻摘要

<CodePrompt>
  "每个工作日上午 7 点，研究过去 24 小时内的 AI 行业新闻。
  重点关注：融资公告、产品发布和重大合作关系。
  给我发送一个 5 点摘要的电子邮件。"
</CodePrompt>

**计划**: 每天上午 7 点（仅限工作日）

**输出**: 包含精选新闻摘要的电子邮件

### 示例 2：每周竞争对手跟踪

<CodePrompt>
  "每周五下午 5 点，检查这 10 个竞争对手是否有：新的博客文章、
  产品更新、价格变化和招聘信息。创建一个比较
  表并保存到 Google Drive。"
</CodePrompt>

**计划**: 每周（周五下午 5 点）

**输出**: Google Drive 中的比较表

### 示例 3：每月分析报告

<CodePrompt>
  "在每月的 1 号，分析上个月的网站流量。
  创建一个幻灯片演示文稿，内容包括：访客趋势、热门页面、流量来源、
  和关键洞察。发布到 Slack #marketing。"
</CodePrompt>

**计划**: 每月 (每月 1 日上午 9 点)

**输出**: 幻灯片演示文稿已发布到 Slack

## 如何设置

**步骤 1: 描述任务** 明确说明您希望 Manus 执行的操作。

**步骤 2: 指定计划**

* "每天上午 9 点"
* "每周一上午 8 点"
* "每月 1 日"
* "每个工作日上午 7 点"
* "明天下午 3 点" (一次性)

**步骤 3: 定义输出**

* 通过电子邮件将结果发送给您
* 发布到 Slack 频道
* 保存到 Google Drive
* 更新电子表格
* 通过连接器发送

## 计划选项

| 计划类型    | 示例             | 用例          |
| :------ | :------------- | :---------- |
| **每日**  | "每天上午 9 点"     | 新闻摘要，每日指标   |
| **工作日** | "每个工作日上午 8 点"  | 业务报告，工作更新   |
| **每周**  | "每周一上午 10 点"   | 每周回顾，竞争对手跟踪 |
| **每月**  | "每月 1 日上午 9 点" | 每月报告，账单分析   |
| **自定义** | "每周二和周四下午 2 点" | 特定的重复需求     |
| **一次性** | "明天下午 3 点"     | 延迟执行        |

## 管理定时任务

**查看活动的计划**: 导航到 设置 → 定时任务 查看所有活动的计划。

**暂停计划**: 暂时关闭任何计划，而无需删除它。

**编辑计划**: 修改时间、任务描述或输出方法。

**删除计划**: 删除不再需要的计划。

**查看执行历史记录**: 查看过去的运行、结果和任何错误。

## 优化定时任务的技巧

**明确指定时间**:

* ✅ "每个工作日美国东部时间上午 8 点"
* ❌ "在早上"

**定义清晰的输出**:

* ✅ "通过电子邮件发送给我一份 5 点总结"
* ✅ "发布到 Slack #team 频道"
* ❌ "让我知道你发现了什么"

**包含研究的时间范围**：

* ✅ “过去 24 小时的新闻”
* ✅ “自上周以来的更新”
* ❌ “最近的新闻”（含糊不清）

**在计划前进行测试**：

* 首先手动运行任务，确保其按预期工作
* 然后设置计划

## 快速用例

| 用例         | 计划        | 输出              |
| :--------- | :-------- | :-------------- |
| **新闻监控**   | 每日上午 7 点  | 电子邮件摘要          |
| **竞争对手跟踪** | 每周五下午 5 点 | Google Drive 报告 |
| **社交媒体监控** | 每日上午 9 点  | Slack 通知        |
| **分析报告**   | 每月 1 日    | 幻灯片演示文稿         |
| **价格跟踪**   | 每日上午 6 点  | 电子表格更新          |
| **内容策划**   | 工作日上午 8 点 | 电子邮件摘要          |

## 常见问题

<AccordionGroup>
  <Accordion title="如果定时任务失败了怎么办？">
    Manus 会通知您并记录错误。您可以查看问题并调整任务。
  </Accordion>

  <Accordion title="我可以立即运行任务并同时安排它吗？">
    可以。立即运行它进行测试，然后设置重复计划。
  </Accordion>

  <Accordion title="计划的时区是什么？">
    您的账户时区（在“设置”中设置）。您可以在计划中指定时区：“上午 9 点 EST”
  </Accordion>

  <Accordion title="我可以拥有多少个定时任务？">
    取决于您的套餐。请查看“设置”→“定时任务”以了解您的限制。
  </Accordion>

  <Accordion title="我可以安排广泛研究（Wide Research）任务吗？">
    可以。Manus 可以执行的任何任务都可以安排。
  </Accordion>
</AccordionGroup>

***
