> For the complete documentation index, see [llms.txt](https://docs.yansalabs.com/tracy-social-ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yansalabs.com/tracy-social-ai/technical-docs/scheduling-posts.md).

# Scheduling Posts

{% hint style="info" %}
For most customers, the **Scheduler,** available at **Tracy Social AI -> Configuration -> Scheduler** in the left nav, is the optimal way to setup and maintain a regular cadence of [Social Posts](/tracy-social-ai/technical-docs/creating-a-post.md)
{% endhint %}

**Schedule Rules** allow you to configure one or more rules that periodically automatically generate a Social Post record. Schedule Rules are configurable to provide a great deal of flexibility and variety in your Social Post content and timing.

The Schedule Rule form is organized into sections to simplify configuration:

* **Main Form**: Core configuration information about the Schedule Rule
* **Post Content**: Configuration affecting the resulting [**Social Post**](/tracy-social-ai/technical-docs/creating-a-post.md) content
* **Run Schedule**: Details about when to run the **Schedule Rule**
* **Post Schedule**: Details about when to post the resulting [**Social Post**](/tracy-social-ai/technical-docs/creating-a-post.md)

<div><figure><img src="/files/5IMhsuhif1ZaxgY4sBfE" alt=""><figcaption><p>Main Form</p></figcaption></figure> <figure><img src="/files/yqwWzUjx9bVzaHQSahEP" alt=""><figcaption><p>Post Content</p></figcaption></figure> <figure><img src="/files/3OHW5Vw8342MwtcTVvd3" alt=""><figcaption><p>Run Schedule</p></figcaption></figure> <figure><img src="/files/sG3kV5PaANcwwdaa6ovF" alt=""><figcaption><p>Post Schedule</p></figcaption></figure></div>

### Main Form

* **AI connector**: [**AI Connector**](/tracy-social-ai/technical-docs/getting-started/setting-up-an-ai-connector.md) to be used for Social Post content generation
* **AI model**: [**AI Model**](/tracy-social-ai/technical-docs/getting-started/setting-up-an-ai-connector/ai-models.md) against which the Social Post content will be generated
* **Social platforms**: The [**Social Platforms**](/tracy-social-ai/technical-docs/getting-started/setting-up-a-social-platform.md) to which the Social Post will be sent
* **Skip draft**: If enabled, the resulting Social Post will skip the 'Draft' state
* **Approval group**: Default group to approve content of the Social Post before posting. If left blank, the approval stage will be skipped
* **Last run**: Indicator of the last time the Schedule Rule was run

{% hint style="info" %}
All configurations on the **Schedule Rule** can be overridden on the resulting [**Social Post**](/tracy-social-ai/technical-docs/creating-a-post.md) record, if desired. The Schedule Rule is the ideal place for the 'default' settings that are typically used.
{% endhint %}

### Post Content

#### Prompt

* **Prompt type**: Determines how to select the [**AI Prompt**](/tracy-social-ai/technical-docs/components-of-a-post/ai-prompts.md) used for the Social Post
  * **Static**: Use a specified AI Prompt
  * **Random**: Use a random active AI Prompt from the AI Prompt table
  * **Filtered**: Use the first AI Prompt returned from a filtered list of active AI Prompts
  * **Random Filtered**: Use a random active AI Prompt from a filtered list
  * **Scripted**: Define an AI Prompt via script. This can be a new text AI Prompt or the SysID of an existing AI Prompt record.

#### Persona

* **Persona type**: Determines how to select the [**AI Persona**](/tracy-social-ai/technical-docs/components-of-a-post/ai-personas.md) used for the Social Post
  * **Static**: Use a specified AI Persona
  * **Random**: Use a random active AI Persona from the AI Persona table
  * **Filtered**: Use the first AI Persona returned from a filtered list of active AI Persona
  * **Random Filtered**: Use a random active AI Persona from a filtered list
  * **Scripted**: Define an AI Persona via script. This can be a new text AI Persona description or the SysID of an existing AI Persona record.

#### Context Statements

* **Context statement type**: Determines how to select the [**Context Statements**](/tracy-social-ai/technical-docs/components-of-a-post/context-statements.md) used for the Social Post
  * **Static**: Use one or more specified Context Statements
  * **Random**: Use a random active Context Statement from the Context Statement table
  * **Filtered**: Use the first Context Statement returned from a filtered list of active Context Statements
  * **Random Filtered**: Use a random active Context Statement from a filtered list
  * **Scripted**: Define an array of Context Statements via script. These can be new text Context Statements or SysIDs of existing Context Statement records.

#### Instruction Statements

* **Instruction statement type**: Determines how to select the [**Instruction Statements**](/tracy-social-ai/technical-docs/components-of-a-post/instruction-statements.md) used for the Social Post
  * **Static**: Use one or more specified Instruction Statements
  * **Random**: Use a random active Instruction Statement from the Instruction Statement table
  * **Filtered**: Use the first Instruction Statement returned from a filtered list of active Instruction Statements
  * **Random Filtered**: Use a random active Instruction Statement from a filtered list
  * **Scripted**: Define an array of Instruction Statements via script. These can be new text Instruction Statements or SysIDs of existing Instruction Statement records.

{% hint style="info" %}
If you need to use highly dynamic data within your Prompt, Persona, Context Statement, or Instruction Statement scripts to best inform the content of your Social Post, you can do so by creating a **scratchpad** variable as part of the **Run Condition** script explained in the [Run Schedule](#run-schedule) section below.

This allows you to dynamically gather information at run-time, which can then be used in each of the scripts above.
{% endhint %}

#### Post Options

* **Social options script**: Optionally, a script to generate a JSON object defining additional options to be added to the request payload sent to the [Social Platform](/tracy-social-ai/technical-docs/getting-started/setting-up-a-social-platform.md)

### Run Schedule

* **Run**: On what cadence to run the **Schedule Rule**
  * **Once**: Run only once, at the time specified
  * **Periodically**: Run periodically, starting on the date specified and repeating at the specified interval
  * **On Demand**: Run only when the **Run Now** button in the form header is clicked
* **Run conditionally**: Use server script to set 'answer' to true/false. If *answer=true*, the rule will proceed to generate a [**Social Post**](/tracy-social-ai/technical-docs/creating-a-post.md). If not, the rule will cancel.

{% hint style="info" %}
Within the **Run condition** script, you can add content to a **scratchpad** object, similar to a workflow or business rule. This scratchpad can then be reference within any of the scripts listed in the [**Post Content**](#post-content) section above. For example:

*scratchpad.nowDate = new GlideDateTime();*

This powerful capability allows you to programmatically gather and/or generate data to be used within your Schedule Rule and resulting Social Post.
{% endhint %}

### Post Schedule

* **Post**: When to send the resulting [Social Post](/tracy-social-ai/technical-docs/creating-a-post.md) to the [Social Platforms](/tracy-social-ai/technical-docs/getting-started/setting-up-a-social-platform.md)
  * **Immediately (Upon Approval)**: Send immediately upon approval of the Social Post. If no Approval Group is specified, the Social Post will be submitted immediately with no approval step.
  * **At Specific Time**: Send at the time specified
  * **Within Schedule**: Post at a random time within the provided Schedule
  * **On Demand**: Post only when the **Post Now** button in the form header is clicked


---

# 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:

```
GET https://docs.yansalabs.com/tracy-social-ai/technical-docs/scheduling-posts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
