> For the complete documentation index, see [llms.txt](https://docs.digibee.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digibee.com/documentation/connectors-and-triggers/triggers/scheduling/scheduler.md).

# Scheduler Trigger

## **Scheduler Trigger**

Learn more about the Scheduler Trigger and how to use it on the Digibee Integration Platform.

## **Overview**

The Scheduler Trigger runs a pipeline on a recurring schedule defined by a [cron expression](https://en.wikipedia.org/wiki/Cron). It is useful when the data source cannot push data to Digibee through webhooks or event-based triggers, and the pipeline must pull data on a fixed schedule instead.

The **Cron Expression** field also accepts Globals, allowing different environments (for example, Test and Production) to run the same pipeline on different schedules without duplicating the pipeline definition.

## **Scheduler Trigger variables**

The Scheduler Trigger has four types:

* **5-Minute Scheduler:** Pre-configured to execute every 5 minutes.
* **30-Minute Scheduler:** Pre-configured to execute every 30 minutes.
* **Midnight Scheduler:** Pre-configured to execute at midnight in the selected timezone.
* **Custom Scheduler:** No pre-configuration. Accepts a custom cron expression.

## **Parameters**

<table data-header-hidden="false" data-header-sticky><thead><tr><th>Parameter</th><th>Description</th><th>Data type</th><th>Supports DB</th><th>Default</th></tr></thead><tbody><tr><td><strong>Cron Expression</strong></td><td><p>Expression that defines seconds, minutes, hours, and the recurrence of a pipeline in days. Accepts a static value or a <a href="/spaces/jvO5S91EQURCEhbZOuuZ/pages/-MkqahfptVSOoczFtCr_">Global of the <strong>Cron</strong> type</a> using Double Braces syntax (for example, <code>{{global.myCronExpression}}</code>). </p><p></p><p>For expression format details, refer to the <a href="http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html">Quartz Scheduler documentation</a>. To build expressions interactively, use <a href="http://www.cronmaker.com/">CronMaker</a>.</p></td><td>String</td><td>✅</td><td>N/A</td></tr><tr><td><strong>Time Zone</strong></td><td>Time Zone under which the pipeline executes. If unspecified, UTC is used. For example, 12:00 UTC corresponds to 09:00 in the São Paulo Time Zone.</td><td>String</td><td>❌</td><td>N/A</td></tr><tr><td><strong>Maximum Timeout</strong></td><td>Maximum pipeline processing time before the execution ends, in milliseconds.</td><td>Integer</td><td>❌</td><td><code>30000</code></td></tr><tr><td><strong>Retries</strong></td><td>Maximum number of retry attempts if execution fails.</td><td>Integer</td><td>❌</td><td><code>0</code></td></tr><tr><td><strong>Allow Redelivery Of Messages</strong></td><td>When enabled, allows messages to be resent if the Pipeline Engine fails.</td><td>Boolean</td><td>❌</td><td><code>false</code></td></tr><tr><td><strong>Allow Concurrent Scheduling</strong></td><td>When enabled, a new execution starts even if a previous execution is still running.</td><td>Boolean</td><td>❌</td><td><code>false</code></td></tr></tbody></table>

## **Parameters additional information**

### **Allow Concurrent Scheduling**

If a pipeline is set to execute every 3 minutes and a previous execution takes 4 minutes, this parameter determines whether the next execution starts immediately or waits.

* **Enabled:** The next execution starts on schedule, regardless of whether the previous one has finished.
* **Disabled:** The next execution is held until the previous execution completes.

### **Cron Expression with Globals**

You can reference a Global in the **Cron Expression** field to apply different schedules per environment using a single pipeline definition. For example, a Test environment can run every 5 minutes while Production runs once a day.

#### **How to configure**

Before referencing a Global in the trigger, create one in the Globals Management area.

1. Open the **Build** page on the platform.
2. Access **Globals**.
3. Click **Create**.
4. Select the **Cron** category.
5. Define the cron expression value for each environment (Test, Prod).
6. Fill in the remaining fields as described in the [Globals documentation](/documentation/developer-guide/development-cycle/build-overview/globals.md).
7. Click **Save**.

<figure><img src="/files/mXKlEUMeb13UY7ATC1pt" alt=""><figcaption></figcaption></figure>

Once the Global is created, open your pipeline and access the trigger configuration. In the **Cron Expression** field, enter `{{global.` and select the desired variable. Only variables of the **Cron** category will be listed. After selection, the field will be filled with `{{global.global-name}}`.

Note that variable resolution happens at deployment time. When you deploy the pipeline, the system validates and applies the referenced Global to that environment.

## **Scheduler Trigger in action**

This trigger is useful when a data source cannot push data to Digibee using HTTP, REST, HTTP File, Kafka, RabbitMQ, or JMS. Common use cases include:

* Polling files from SFTP, FTP, Amazon S3, Google Cloud Storage, and similar file storage services.
* Querying databases directly (in this case, use the **Stream DB** connector with pagination).
* Checking the status of Digibee Integration Platform endpoints that do not support webhook-based notifications.

### **Scenario: Pipeline executed every 30 seconds, without overlap, using a static data source**

The following example shows how to configure a Scheduler Trigger to execute a pipeline every 30 seconds with no execution overlap. A 2-minute timeout is set using the São Paulo Time Zone (UTC-3).

Create a new pipeline and configure the trigger with the following values:

* **Cron Expression:** `0/30 ** ? ***`
* **Time Zone:** `America/Sao_Paulo`
* **Maximum Timeout:** `120000`
* **Retries:** `0`
* **Allow Redelivery Of Messages:** disabled
* **Allow Concurrent Scheduling:** disabled

Next, add a [**JSON Generator (Mock)**](/documentation/connectors-and-triggers/connectors/tools/json-generator.md) connector to the pipeline and connect it to the trigger. Configure it with the following JSON so that the pipeline returns a static payload on each execution:

```json
{
    "data": {
        "products": [
            {
                "name": "Samsung 4k Q60T 55",
                "price": 3278.99
            },
            {
                "name": "Samsung galaxy S20 128GB",
                "price": 3698.99
            }
        ]
    }
}
```

Every time the pipeline runs, the configured JSON is returned automatically.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.digibee.com/documentation/connectors-and-triggers/triggers/scheduling/scheduler.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
