---
title: Triggers and time
project: Flow
version: 11.1
section: components
language: en
license: MIT
url: https://totaljs.es/docs/flow/11-1/components/triggers-and-time/
updated: 2026-11-20T06:50:52.962Z
---

# Triggers and time

> Components that start messages on demand, on a schedule or from an endpoint, and work with dates.

Components that start messages on demand, on a schedule or from an endpoint, and work with dates. This page holds the catalogue groups **Triggers**, **Timers**, **Date & Time**.

Each entry lists the inputs and outputs of the component, its main settings and the text of its readme. To add a component to a FlowStream, see [Download components](/flow/11-1/guides/download-components/).

## API

### crontab.html · version 1

Type: `component`

Triggers data at the times you set with a cron expression.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `random` | `Boolean` | no | `true` | Random data. |
| `type` | `String` | no | `now` | Type. One of: `string` (String), `number` (Number), `boolean` (Boolean), `now` (Current date and time), `date` (Date), `object` (Object), `buffer` (Buffer as Base64). |
| `data` | `String` | no |  | Data. |
| `timers` | `Array` | no | `["0 9 * * *"]` | Timers. |
| `restart` | `Boolean` | no | `false` | Trigger 5s after initialization. |
| `offset` | `String` | no |  | Time zone offset. |

**Inputs:** none.  
**Outputs:** `output` (Output).

The component can make a trigger in the specific time and date.

**Cron string: `* * * * *`**

Meaning of each `*` explained bellow, in order from left to right:

- minute `0 - 59`
- hour `0 - 23`
- day of month `1 - 31`
- month `1 - 12`
- day of week `0 - 6` and `0` is Sunday

```
0 16 * * *      -> trigger every day at 16:00
20 19 * * *     -> every day at 19:20 and 19:40
* * * * *       -> trigger every minute
0 20 * * 1      -> every monday at 20:00
```

### date.html · version 1

Type: `component`

Returns the current date and time, raw or formatted.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `format` | `String` | no |  | Date format. |

**Inputs:** `input` (Trigger).  
**Outputs:** `output` (Date/Time).

The component will return a Date/Time object (raw or formatted) according to its configuration.

### exec.html · version 1

Type: `component`

Sends data into the FlowStream when your code calls it.

**Inputs:** none.  
**Outputs:** `output` (Output).

The component is extraordinary because it must be executed directly from the source code via the `flowstream.exec()` method. The component triggers received data into the Flow.

```js
var opt = {};
opt.id = 'ID_OF_EXEC_INSTANCE';
opt.data = { custom: 'data' };
opt.callback = function(err, msg) {
	// msg.uid;
	// msg.ref;
	// msg.repo {Object}
	// msg.data {Object}
	// msg.cloned {Number} how many times was the message cloned?
	// msg.duration {Number} in milliseconds
};

// optional:
// opt.vars = {};    --> custom variables
// opt.repo = {};    --> custom repository data and this data will be returned in the callback
// opt.uid;          --> for storing some unique ID
// opt.ref;          --> for storing some reference ID
flowinstance.exec(opt);
```

### minutely.html · version 1

Type: `component`

Triggers data every minute.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `random` | `Boolean` | no | `true` | Random data. |
| `type` | `String` | no | `now` | Type. One of: `now` (Current date), `counter` (Counter), `string` (String), `number` (Number), `boolean` (Boolean), `date` (Date), `object` (Object), `buffer` (Buffer as Base64). |
| `data` | `String` | no |  | Data. |

**Inputs:** none.  
**Outputs:** `output` (Output).

The component triggers data into the Flow in every minute.

### notify.html · version 1

Type: `component`

Receives data that is sent to the notify endpoint.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `method` | `String` | no | `all` | HTTP Method. One of: `all` (All supported HTTP methods), `GET`, `POST`. |
| `send` | `String` | no | `all` | Send to output. One of: `all` (Everything), `query` (Query arguments), `body` (Payload), `headers` (Headers), `cookies` (Cookies). |

**Inputs:** none.  
**Outputs:** `output` (Output).

This component captures data on the `/notify/` endpoint.

__Output data__:

```js
{
	"method": String,
	"query": Object,
	"body": Object,
	"headers": Object,
	"cookies": Object,
	"url": String,
	"ip": String
}
```

### timezone.html · version 1

Type: `component`

Converts a date and time to a time zone.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `ts` | `String` | no | `Europe/Bratislava` | Timezone. |
| `input` | `String` | no | `ts` | Input property. |
| `output` | `String` | no | `ts` | Output property. |

**Inputs:** `input` (Input).  
**Outputs:** `output` (Output).

This component converts a date and time to a specified timezone and returns the corresponding UTC date.

### timeout.html · version 1

Type: `component`

Starts a timeout and restarts it when a new message arrives.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `timeout` | `Number` | no | `5` | Timeout. |

**Inputs:** `input` (Input).  
**Outputs:** `output` (Output).

The component starts a timeout and restarts it when a new message arrives.

### timer.html · version 3

Type: `component`

Triggers data at a regular interval.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `random` | `Boolean` | no | `true` | Random data. |
| `type` | `String` | no | `string` | Type. One of: `string` (String), `number` (Number), `boolean` (Boolean), `date` (Date), `object` (Object), `buffer` (Buffer as Base64). |
| `data` | `String` | no |  | Data. |
| `prop` | `String` | no |  | Write to. |
| `restart` | `Boolean` | no | `false` | Trigger 5s after initialization. |
| `interval` | `Number` | no | `5000` | Interval (milliseconds). |

**Inputs:** none.  
**Outputs:** `output` (Output).

The component triggers data into the Flow in the specified interval.

### trigger.html · version 6

Type: `component`

Sends data into the FlowStream when you select its button.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `random` | `Boolean` | no | `true` | Random data. |
| `type` | `String` | no | `string` | Type. One of: `string` (String), `number` (Number), `boolean` (Boolean), `date` (Date), `object` (Object), `buffer` (Buffer as Base64). |
| `data` | `String` | no |  | Data. |
| `restart` | `Boolean` | no | `false` | Trigger 5s after initialization. |
| `prompt` | `Boolean` | no | `false` | Prompt. |
| `prop` | `String` | no |  | Write to. |
| `promptlabel` | `String` | no |  | Prompt label. |

**Inputs:** none.  
**Outputs:** `output` (Output).

The component triggers data into the Flow.
