Skip to content
This is an archived version of the documentation downloaded from LogScale Documentation Archives. Up to date documentation, and documentation for later versions, is available on LogScale Documentation

## `beta:repeating()`

### Important

This is a beta feature, and may not work as expected and may be removed from the product without warning

Marks the live query the function is used in as repeating.

A repeating query is a live query that is implemented by making repeated historical queries. This can be useful when combined with functions not supported in live queries, such as `selfJoin()`, `selfJoinFilter()`, or certain applications of join when joining on the same repository.

When the query snapshot cache is enabled, the historical queries made by a repeating query will reuse previous results and will therefore not be as much work for LogScale to execute as a regular historical query. When this happens, the update interval will be adjusted to the nearest time-bucket.

This function has no effect if used in a historical query.

This function is in beta and the behavior may change in future versions of LogScale.

The feature RepeatingQueries must be enabled for this function to be available. This feature can be enabled by making the following GraphQL mutation as root from the API explorer at `$YOUR_LOGSCALE_URL/docs/api-explorer`:

graphql

    mutation {
      enableFeature(feature: RepeatingQueries)
    }

### Note

If this feature is disabled, then any alert, dashboard, or saved query using `beta:repeating()` will fail.

Parameter | Type | Required | Default Value | Description
--- | --- | --- | --- | ---
`as` | string | optional[a] |  | The name of the output field.
`interval`[b] | long | optional[a] |  | The time interval between successive historical queries. The time span is defined as a Relative Time Syntax. If not specified, a default interval is selected.
[a] Optional parameters use their default value unless explicitly set. [b] The parameter name `interval` can be omitted.

Hide omitted argument names for this function

Show omitted argument names for this function

> Omitted Argument Names

> The argument name for `interval` can be omitted; the following forms of this function are equivalent:

> logscale Syntax

>     beta:repeating("value")

> and:

> logscale Syntax

>     beta:repeating(interval="value")

> These examples show basic structure only.

### `beta:repeating()` Syntax Examples

Repeat a query every 5 min:

logscale

    beta:repeating(5m)

#### Enter search term