# Timer

### Overview

The **Timer Component** triggers at a specified interval, sending periodic messages based on the configured time delay. The first message is sent immediately when the flow starts, followed by scheduled ticks at regular intervals.

### Usage

This component is used for time-based automation, such as polling, scheduling, and recurring execution in workflows.

#### Output Ports

| Port  | Description                              |
| ----- | ---------------------------------------- |
| `out` | Emits a message at the defined interval. |

**Output Properties**

| Property   | Type      | Description                                              |
| ---------- | --------- | -------------------------------------------------------- |
| `lastTick` | `string`  | The last execution time (ISO 8601 format).               |
| `now`      | `string`  | The current execution time (ISO 8601 format).            |
| `elapsed`  | `integer` | Time elapsed (in milliseconds) since the last execution. |

#### Properties

| Property   | Type      | Description                                       |
| ---------- | --------- | ------------------------------------------------- |
| `interval` | `integer` | Execution interval in minutes (min 5, max 35000). |

#### Processing Logic

1. **Immediate Trigger**: Sends an initial message immediately upon starting the flow.
2. **Recurring Execution**: The timer schedules and emits messages at the defined interval.
3. **Crash Recovery**: Ensures messages are not lost in case of system restarts by handling state recovery.

### Notes

* **Minimum Interval**: The smallest allowed interval is 5 minutes.
* **Ensured Execution**: The component ensures that a tick is processed, even after a system restart.
* **Long Interval Support**: Supports intervals up to 35000 minutes (approximately 24 days).

This component is ideal for workflows requiring periodic execution, such as polling APIs, running background tasks, or time-based automation.


---

# Agent Instructions: 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.appmixer.com/connector-configuration/utils/timers/timer.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.
