> ## 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 點，研究我們的 Top 5 競爭對手，並向我發送
  過去一週任何產品更新或新聞的摘要"
</CodePrompt>

### 複雜計劃

<CodePrompt>
  "每月 1 號，分析我們的網站流量數據，
  建立包含關鍵見解的報告，並將其發佈到我們的 Notion 資料庫
</CodePrompt>

## 何時使用定时任务

用於：

* **重複性研究** (每日新聞摘要、每週競爭對手更新)
* **定期報告** (每月分析、每週績效摘要)
* **週期性資料收集** (抓取價格、追蹤提及)
* **自動化監控** (檢查更新、追蹤變化)

不適用於：

* 您現在需要的臨時任務（只需正常執行即可）
* 即時監控（定时任务在特定時間執行，而不是持續執行）

## 快速範例

### 範例 1：每日新聞摘要

<CodePrompt>
  "每個工作日上午 7 點，研究過去 24 小時內的 AI 產業新聞。
  重點關注：融資公告、產品發佈和重大合作關係。
  給我發送一個 5 點摘要的電子郵件。"
</CodePrompt>

**Schedule**: 每天上午 7 點（僅限工作日）

**Output**: 包含精選新聞摘要的電子郵件

### 範例 2：每週競爭對手追蹤

<CodePrompt>
  "每週五下午 5 點，檢查這 10 個競爭對手是否有：新的部落格文章、
  產品更新、價格變化和招聘資訊。建立一個比較
  表並儲存到 Google Drive。"
</CodePrompt>

**Schedule**: 每週（週五下午 5 點）

**Output**: 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>

***
