> Discover all available pages from the documentation index: https://mastra.zisheng.pro/ja/llms.txt # Workflow\.sleep() `.sleep()` メソッドは、指定したミリ秒の間実行を一時停止します。静的な数値、または実行時に待機時間を定義するコールバック関数を受け取ります。 ## 使用例 ```typescript workflow.sleep(5000) ``` ## パラメーター **milliseconds** (`number | ((context: { inputData: any }) => number | Promise)`): 実行を一時停止するミリ秒数、または待機時間を返すコールバック ## 戻り値 **workflow** (`Workflow`): メソッドチェーンに使用する Workflow インスタンス ## その他の使用例 ```typescript import { createWorkflow, createStep } from "@mastra/core/workflows"; const step1 = createStep({...}); const step2 = createStep({...}); export const testWorkflow = createWorkflow({...}) .then(step1) .sleep(async ({ inputData }) => { const { delayInMs } = inputData; return delayInMs; }) .then(step2) .commit(); ```