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

# Scheduler

> The Scheduler is part of the core extensions of the **FlowX.AI platform**. It can be easily added to your custom FlowX deployment to **enhance the core platform capabilities with functionality specific to scheduling messages.**

The service offers the possibility to schedule a message that you only need to process after a configured time period.

It can be quickly deployed on the chosen infrastructure and then connected to the **FLOWX.AI Engine** through Kafka events.

## Using the scheduler

After deploying the scheduler service in your infrastructure, you can start using it to schedule messages that you need to process at a later time.

One such example would be to use the scheduler service to expire processes that were started but haven't been finished.

<Warning>
  First you need to check the configured kafka topics match the ones configured in the engine deployment.
</Warning>

<Check>
  For example the engine topics `KAFKA_TOPIC_PROCESS_SCHEDULE_OUT_SET` and `KAFKA_TOPIC_PROCESS_SCHEDULE_OUT_STOP` **must** be the same with the ones configured in the scheduler at `KAFKA_TOPIC_SCHEDULE_IN_SET` and `KAFKA_TOPIC_SCHEDULE_IN_STOP` environment variables.
</Check>

When a process is scheduled to expire, the engine sends the following message to the scheduler service (on the topic `KAFKA_TOPIC_SCHEDULE_IN_SET`):

```json theme={"dark"}
{
  "applicationName": "onboarding",
  "applicationId": "04f82408-ee66-4c68-8162-b693b06bba00",
  "payload": {
    "scheduledEventType": "EXPIRE_PROCESS",
    "processInstanceUuid": "04f82408-ee66-4c68-8162-b693b06bba00"
  },
  "scheduledTime": 1621412209.353327,
  "responseTopicName": "ai.flowx.process.expire.staging"
}
```

The scheduled time should be defined as `java.time.Instant`.

At the scheduled time, the payload will be sent back to the response topic defined in the message, like so:

```json theme={"dark"}
{
  "scheduledEventType": "EXPIRE_PROCESS",
  "processInstanceUuid": "04f82408-ee66-4c68-8162-b693b06bba00"
}
```

If you don't need the scheduled message anymore, you can discard it by sending the following message (on the topic `KAFKA_TOPIC_SCHEDULE_IN_STOP`)

```json theme={"dark"}
{
  "applicationName": "onboarding",
  "applicationId": "04f82408-ee66-4c68-8162-b693b06bba00"
}
```

These fields, `applicationName` and `applicationId` are used to uniquely identify a scheduled message.

<Card title="Scheduler setup" href="../../../setup-guides/scheduler-setup-guide" icon="gears">
  Steps needed in order to deploy and set up the service
</Card>


## Related topics

- [Deployment guidelines v5.8.0](/release-notes/v5.x/v5.8.0-may-2026/deployment-guidelines-v5.8.md)
- [Update environment variables](/release-notes/v5.x/v5.3.0-december-2025/migrating-from-v5.2-to-v5.3/update-environment-variables-5.3.md)
- [Deployment guidelines v5.9.0](/release-notes/v5.x/v5.9.0-june-2026/deployment-guidelines-v5.9.md)
- [Overview](/release-notes/v5.x/v5.3.0-december-2025/migrating-from-v5.2-to-v5.3/migration-overview.md)
- [FlowX.AI 5.5.0 Release Notes](/release-notes/v5.x/v5.5.0-february-2026/v5.5.0-february-2026.md)
