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

# every()

> `protected` **every**(`intervalSeconds`, `method`, `payload?`, `opts?`): `Promise`\<`string`>

Schedule a persistent task to run repeatedly at a fixed interval.

The first fire is `intervalSeconds` from now. After each successful run
the next fire is scheduled one interval from the start of the drain turn,
and the attempt counter resets. Failed runs retry with backoff like any
other task. Use a stable `opts.id` to make re-arming an upsert (e.g. on
every activation).

**Parameters**

| Parameter | Type | Description |
| - | - | - |
| `intervalSeconds` | `number` | Recurrence interval, in **seconds**; must be positive or the call throws. |
| `method` | `string` | Name of the method to invoke on each fire. |
| `payload?` | `unknown` | Value passed to the method on each fire. |
| `opts?` | [`ScheduleOptions`](/docs/agent-sdk/interface/schedule#scheduleoptions) | Stable id and retry policy — see [ScheduleOptions](/docs/agent-sdk/interface/schedule#scheduleoptions). |

**Returns**

`Promise`\<`string`>

The task id.
