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

# 自動スケジュール概要

> 将来の投稿が自動的に公開されるようスケジュールを作成します

export const PlansAvailable = ({plans = [], maxPackRequired}) => {
  let displayPlans = plans;
  if (plans && plans.length === 1) {
    const lowerCasePlan = plans[0].toLowerCase();
    if (lowerCasePlan === "business") {
      displayPlans = ["Launch", "Business", "Enterprise"];
    } else if (lowerCasePlan === "premium") {
      displayPlans = ["Premium", "Launch", "Business", "Enterprise"];
    }
  }
  return <Note>
Available on {displayPlans.length === 1 ? "the " : ""}
{displayPlans.join(", ").replace(/\b\w/g, l => l.toUpperCase())}{" "}
{displayPlans.length > 1 ? "plans" : "plan"}.

{maxPackRequired && <span onClick={() => window.open('https://www.ayrshare.com/docs/additional/maxpack', '_self')} className="flex items-center mt-2 cursor-pointer">
 <span className="px-1.5 py-0.5 rounded text-sm" style={{
    backgroundColor: '#C264B6',
    color: 'white',
    fontSize: '12px'
  }}>
   Max Pack required
 </span>
</span>}
</Note>;
};

<PlansAvailable plans={["premium"]} maxPackRequired={false} />

自動スケジュールを使用すると、事前定義された投稿スケジュールを作成できます。
複数のスケジュールを設定でき、それぞれに指定した曜日の特定の投稿時刻を割り当てられます。
自動スケジュールは、[Publish Post エンドポイント](/apis/post/post) の `scheduleDate` フィールドとは異なるものです。

## 自動スケジュールの主な機能

<ul class="custom-bullets">
  <li>カスタムスケジュールを作成できます。例: 月曜日と水曜日の午前 9 時、午後 2 時、午後 5 時に投稿。</li>
  <li>投稿は次に利用可能なタイムスロットに自動的にキューイングされます。</li>
  <li>作成できるスケジュール数に制限はありません。</li>

  <li>
    自動スケジュールは、[Publish Post エンドポイント](/apis/post/post) の `scheduleDate` フィールドとは異なり、
    スケジュール処理を自動化することを目的としています。自動スケジュールと `scheduleDate` は
    いずれか一方のみを使用し、両方を使用しないでください。
  </li>
</ul>

## 自動スケジュールのシナリオ例

1. 現在時刻: 月曜午前 10 時(GMT)。
2. 午前 9 時と午後 5 時に投稿する自動スケジュールを作成します。
3. このスケジュールに 3 つの投稿を追加します。
4. システムはこれらの投稿を、月曜午後 5 時、火曜午前 9 時、火曜午後 5 時に自動的にスケジュールします。

<Info>
  スケジュール済みの投稿を削除しても、そのタイムスロットは解放されません。例えば、月曜午後 5 時の投稿を削除してから
  同じスケジュールに新しい投稿を追加すると、次に利用可能なスロット(この場合は水曜午前 9 時)に配置されます。
</Info>

## 自動スケジュールを使用した公開

スケジュールは、[Publish Post エンドポイント](/apis/post/post) で以下のフィールドを使用して適用できます:

```json Auto Schedule theme={"system"}
"autoSchedule": {
   "schedule": true, // required
   "title": "Schedule Title" // optional - case-sensitive
}
```

<ul class="custom-bullets">
  <li>
    `schedule`: (必須)自動スケジュールを有効にするには `true` に設定する必要があるブール値です。
  </li>

  <li>
    `title`: (任意)スケジュールの名前を指定する文字列値です。この `title` は、
    [Set Auto Schedule](/apis/auto-schedule/overview) エンドポイントを使用して作成されたスケジュールの
    名前と一致する必要があります。指定されない場合、デフォルトのタイトルは `default` になります。
    `title` は大文字小文字を区別し、完全に一致する必要があります。
  </li>
</ul>

自動スケジュールの一覧は、[List Auto Schedules](/apis/auto-schedule/list-schedule) エンドポイントを呼び出して確認できます。

詳細については、[自動スケジュール API の使用](https://www.ayrshare.com/blog/understanding-the-ayrshare-auto-schedule-api-endpoint/) の記事を参照してください。

## User Profile の自動スケジュール

特定の user profile に対して自動スケジュールを行うには、[PROFILE\_KEY をヘッダーに追加](/apis/overview#profile-key-format) します。
