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

# Timer expressions

> Configure timer expressions using Cron syntax for scheduling or ISO 8601 format for durations and timeouts.

When working with FlowX.AI components, there are multiple scenarios in which timer expressions are needed.

There are two timer expressions formats supported:

* [**Cron expressions**](#cron-expressions) - used for **Cycle** timers (Timer Start Events and non-interrupting Timer Boundary Events) and to define the expiry time on processes
* [**ISO 8601**](#iso-8601) - used to define dates, durations, and repeating intervals for timer events

## Cron expressions

A cron expression is a string made up of **six mandatory subexpressions (fields) that each specifies an aspect of the schedule** (for example, `* * * * * *`). These fields, separated by white space, can contain any of the allowed values with various combinations of the allowed characters for that field.

> [!NOTE]
>
> A field may be an asterisk (`*`), which always stands for “first-last”. For the day-of-the-month or day-of-the-week fields, a question mark (`?`) may be used instead of an asterisk.

> [!WARNING]
>
> Important: Only Spring cron expressions are permissible for configuration. Refer to the [**official documentation**](https://docs.spring.io/spring-framework/reference/integration/scheduling.html#scheduling-cron-expression) for detailed information on configuring Spring Cron expressions.

Subexpressions:

1. Seconds
2. Minutes
3. Hours
4. Day-of-Month
5. Month
6. Day-of-Week

An example of a complete cron-expression is the string `0 0 12 ? * FRI` - which means **every Friday at 12:00:00 PM**.

More details:

[Scheduling cron expressions](https://docs.spring.io/spring-framework/docs/current/reference/html/integration.html#scheduling-cron-expression)

### Cron Expressions are used in the following example:

* [**Process definition**](https://docs.flowx.ai/6.x/docs/building-blocks/process/process-definition.md) - **Expiry time** - a user can set up a `expiryTime` function on a process, for example, a delay of 30s will be set up like:

![Process definition settings with the expiry time field set to a cron expression](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/release34/timer_process_settings.png)

## ISO 8601

ISO 8601 is an international standard covering the worldwide exchange and communication of date and time-related data. It can be used to standardize the following: dates, time of delay, time intervals, recurring time intervals, etc.

More details:

[ISO 8601 date format](https://www.digi.com/resources/documentation/digidocs/90001488-13/reference/r_iso_8601_date_format.htm)

[ISO 8601 duration format](https://www.digi.com/resources/documentation/digidocs//90001488-13/reference/r_iso_8601_duration_format.htm)

### ISO 8601 format is used in the following examples:

* **Timer events** - a **Definition** with the **Duration** timer type, for example `PT30M` on an interrupting [timer boundary event](https://docs.flowx.ai/6.x/docs/building-blocks/node/timer-events/timer-boundary-event.md) that limits how long a receive task waits for a message

ISO 8601 dates and times:

| Format accepted | Value ranges |
| - | - |
| Year (Y) | YYYY, four-digit, abbreviated to two-digit |
| Month (M) | MM, 01 to 12 |
| Week (W) | WW, 01 to 53 |
| Day (D) | D, day of the week, 1 to 7 |
| Hour (h) | hh, 00 to 23, 24:00:00 as the end time |
| Minute (m) | mm, 00 to 59 |
| Second (s) | ss, 00 to 59 |
| Decimal fraction (f) | Fractions of seconds, any degree of accuracy |

![Timer configuration with an ISO 8601 duration used as a response timeout](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/platform-overview/frameworks-and-standards/timer_response_timeout.png)

* [**Actions**](https://docs.flowx.ai/6.x/docs/building-blocks/actions/actions.md) - **Timer expression** - it can be used if a delay is required on that action

![Action edit dialog with the timer expression field used to delay the action](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/platform-overview/frameworks-and-standards/timer_action_edit.png)


## Related topics

- [Timer events](https://docs.flowx.ai/6.x/docs/building-blocks/node/timer-events/timer-events.md)
- [Timer start event](https://docs.flowx.ai/6.x/docs/building-blocks/node/timer-events/timer-start-event.md)
- [Error glossary](https://docs.flowx.ai/6.x/docs/resources/error-glossary.md)
- [Schedules](https://docs.flowx.ai/6.x/docs/projects/runtime/scheduled-processes.md)
- [Customer onboarding with KYC](https://docs.flowx.ai/6.x/ai-platform/tutorials/customer-onboarding.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.