# Cron Expression Generator

The **Cron expression generator** is a component that enables the generation of a Cron expression.

A **cron expression** is a string of six fields separated by whitespace, which represents a set of times or dates when a job or task should be executed. Each field represents a specific unit of time, such as minutes, hours, days, and so on.

The general format of a cron expression is:\`\* \* \* \* \* \*\`

The fields, in order from left to right, represent:

1. Seconds (0-59)
2. Minutes (0-59)
3. Hours (0-23)
4. Day of the month (1-31)
5. Month (1-12 or Jan-Dec)
6. Day of the week (0-7 or MON-SUN where 0 and 7 is Sunday)

Asterisks (\`\*\`) can be used to represent all values within a field, and commas (\`,\`) can be used to separate multiple values. Hyphens (\`-\`) can be used to specify a range of values within a field, and forward slashes (\`/\`) can be used to specify step values.

For example, the following cron expression will execute a task at 12:30 PM every day:\`0 30 12 \* \* ?\`

And this cron expression will execute a task every 15 minutes: 0 0/15 \* \* \* ?

## How to work with the Cron expression generator? <a href="#how-to-work-with-the-cron-expression-generator" id="how-to-work-with-the-cron-expression-generator"></a>

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FkBd4KtvF3fQm6Azv6lgT%2FExplCron%20expression%20generator_Builder.png?alt=media&#x26;token=d16c2d54-c7e3-4b05-ac25-c503d5d9f12a" alt=""><figcaption></figcaption></figure>

The Cron Expression Generator is used to configure the process to run on a schedule. You should select “Scheduled” as a channel in a flow settings, default value appears in the “Cron Expression“ input field. If you want to change the default value, click the field with cron expression to open the Cron Expression Generator pop-up window.

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FY8C0wLy4IcfocgAmqu2g%2FExplCron%20expression%20generator_pop-up%20window.png?alt=media&#x26;token=69bbafc8-32c3-4344-8406-7f18ab44837b" alt=""><figcaption></figcaption></figure>

At the top of the pop-up window you can choose the desired tab:

* Seconds
* Minutes
* Hours
* Day
* Month
* Advanced

Each tab has its own set of settings. You can select only one of the options in each tab and customize it to suit your needs.

When changing the settings, the final cron expression in both readable and cron expression format will also be displayed at the bottom of the popup, containing the current settings from all tabs – the components of the cron expression.

The Tab **“Advanced”** has two options:

* If you would to generate an expression cron using the generator select “Use cron expression generator“.
* If you would like to fill the cron expression manually, select the “Use custom cron expression” option”. In this case, the field must contain a cron expression. If the field is empty or invalid, you will be informed of the error.

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FH5klY496Tp930YSlPlb6%2FFrame%2050763%20(3).png?alt=media&#x26;token=ebb9102d-b4f2-4d25-9b73-376fc1fb45cc" alt="" width="542"><figcaption></figcaption></figure>

If the settings are incorrect, you see an error, and **the CONFIRM button** is not available.

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2Fm5BooLqF482NVVBTNWvG%2FError%20in%20the%20Cron%20expression%20generator.png?alt=media&#x26;token=22f0c6ca-4c2d-45e9-8570-ed64861371ce" alt=""><figcaption></figcaption></figure>

After the desired value is generated, click **the CONFIRM button.**
