> For the complete documentation index, see [llms.txt](https://docs-embed.anyflow.jp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-embed.anyflow.jp/solution-editor/triggers/scheduler.md).

# スケジューラートリガー

## **概要**

スケジューラーはAnyflowの標準アプリで、エンドユーザーによって事前に定義された時間間隔でソリューションを実行可能です。

## **指定された日時でスケジュール実行**

スケジューラートリガーの「指定された日時でスケジュール実行」を選択します。

## **入力フィールド**

<table><thead><tr><th width="208.7109375">フィールド名</th><th>設定</th><th>説明</th></tr></thead><tbody><tr><td>時間単位</td><td>必須</td><td><p>カスタムスケジュールを選択します。</p><p>- カスタムスケジュール:cron式を使用することにより複雑な時間間隔を指定可能です。</p></td></tr><tr><td>cron式</td><td>必須</td><td>cron式でカスタムスケジュールを設定することが可能です。<br>cron式の詳細については、使い方のセクションをご確認ください。</td></tr></tbody></table>

## **使い方**

### **時間単位を指定する**

`カスタムスケジュール` を選択します。

<figure><img src="https://files.readme.io/5498e15-unit-of-time.png" alt="1440"><figcaption><p>時間単位を指定します</p></figcaption></figure>

{% hint style="success" %}
現状は、カスタムスケジュールのみに対応しています。
{% endhint %}

### **cron式でカスタムスケジュールを設定する**

時間単位で`カスタムスケジュール`を選択します。

<figure><img src="https://files.readme.io/eb42cb4-custom-schedule.png" alt="1440"><figcaption><p><code>カスタムスケジュール</code>を選択します</p></figcaption></figure>

#### **cron式の書き方について**

cron式は固定された順序の構文に従います。\
`[分] [時] [日] [月] [曜日]`

すべての要素を定義する必要があり、空白にすることはできません。\
ワイルドカード（例: `*` `,` `-` など）を使用し、設定します。\
cron式の詳細については、[こちら](https://crontab.guru/)をご確認ください。

#### **cron式の例**

| cron式           | 例                  |
| --------------- | ------------------ |
| `0 0 * * *`     | 毎日`00時00分`         |
| `*/10 * * * *`  | 10分ごと              |
| `0 0 1 * *`     | 毎月1日の`00時00分`      |
| `0 0 L * *`     | 毎月最終日の`00時00分`     |
| `0 0 * * 1,5`   | 毎週月曜日と金曜日の`00時00分` |
| `0,30 * * * *`  | 1時間に2回、`00分`と`30分` |
| `0 9 * * MON#1` | 毎月第1月曜日の`09時00分`   |

#### **cron式を入力する**

`cron式`に直接入力し、設定します。

<figure><img src="https://files.readme.io/341edcc-cron.png" alt="1440"><figcaption><p>cron式を入力します</p></figcaption></figure>

## デプロイ時の注意点

デプロイ中のソリューションに紐付くスケジューラートリガーは、バージョンアップのための**デプロイ中は発火しません**。\
デプロイの開始タイミングによっては、**スケジューラートリガーの実行がスキップされる**場合があります（添付画像のように、6ヶ月目の実行タイミングとデプロイタイミングが重なるケースなどが該当します）

<figure><img src="/files/tpCGNzl9LTc5k77gHGTA" alt="" width="375"><figcaption></figcaption></figure>

バージョンアップデートでデプロイを行う際は、十分にご注意ください。

**＜注意が必要なケース＞**

* **間隔が短いスケジューラートリガーをご利用の場合**
* **デプロイのタイミングがスケジューラートリガーの実行時刻と重なりやすい場合**
* **スケジュールがスキップされた際にデータ欠損などが起こる場合**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs-embed.anyflow.jp/solution-editor/triggers/scheduler.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
