# Time-based Trigger

You can schedule your function's execution using the Time-based Trigger available in the settings panel. It allows you to trigger the function **Every x minutes** or using a **Crontab expression**:

<figure><img src="https://884329393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhzNRg0B4ECiNXc093G%2Fuploads%2Fb30n0bqfJBWUlEkQYgxv%2Fimage.png?alt=media&#x26;token=c9895a00-3c97-4d8c-bb8c-e9d9607d162d" alt=""><figcaption></figcaption></figure>

### Every x minutes

You may trigger a function at periodic time intervals, expresses in minutes. This trigger method will run the UbiFunction's `main` function. The minimum and maximum values admisible by this field are 1 and 60 minutes, respectively.

<figure><img src="https://884329393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhzNRg0B4ECiNXc093G%2Fuploads%2FCXkK8cYWp268Md40mWho%2Fimage.png?alt=media&#x26;token=09945a5f-73ec-48d7-9dbb-bf599ba2bc3f" alt=""><figcaption></figcaption></figure>

### Crontab expression

A cron expression is a string consisting of five subexpressions (fields) that describe individual details of the schedule. These fields, separated by white space, can contain any of the allowed values with various combinations of the allowed characters for that field.

| Field        | Values          | Wildcards |
| ------------ | --------------- | --------- |
| Minutes      | 0-59            | , - \* /  |
| Hours        | 0-23            | , - \* /  |
| Day-of-month | 1-31            | , - \* /  |
| Month        | 1-12 or JAN-DEC | , - \* /  |
| Day-of-week  | 1-7 or SUN-SAT  | , - \* /  |

**Wildcards**

<table><thead><tr><th width="135">Wildcard</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td>comma ","</td><td>List of allowed values</td><td>In the Month field, JAN,FEB,MAR includes January, February, and March.</td></tr><tr><td>dash "-"</td><td>Range of allowed values</td><td>In the Day field, 1-15 includes days 1 through 15 of the specified month.</td></tr><tr><td>asterisk "*"</td><td>Includes all values in the field</td><td>In the Hours field, * includes every hour</td></tr><tr><td>slash "/"</td><td>Specifies increments</td><td>In the Minutes field, you could enter 1/10 to specify every tenth minute, starting from the first minute of the hour.</td></tr></tbody></table>

{% hint style="info" %}
You can [crontab.guru](https://crontab.guru/) to test your crontab expressions.&#x20;
{% endhint %}

**Limitations**

* Cron expressions that lead to rates faster than 1 minute are not supported.

**Examples**

You can use the following sample cron strings when creating a rule with schedule:

<table><thead><tr><th width="109">Minutes</th><th width="77">Hours</th><th width="117">Month day</th><th width="84">Month</th><th width="106">Week day</th><th>Meaning</th></tr></thead><tbody><tr><td>0</td><td>10</td><td>*</td><td>*</td><td>*</td><td>Run at 10:00 am (UTC+0) every day</td></tr><tr><td>15</td><td>12</td><td>*</td><td>*</td><td>*</td><td>Run at 12:15 pm (UTC+0) every day</td></tr><tr><td>0</td><td>18</td><td>*</td><td>*</td><td>MON-FRI</td><td>Run at 6:00 pm (UTC+0) every Monday through Friday</td></tr><tr><td>0</td><td>8</td><td>1</td><td>*</td><td>*</td><td>Run at 8:00 am (UTC+0) every 1st day of the month</td></tr><tr><td>0/15</td><td>*</td><td>*</td><td>*</td><td>*</td><td>Run every 15 minutes</td></tr><tr><td>0/10</td><td>*</td><td>*</td><td>*</td><td>MON-FRI</td><td>Run every 10 minutes Monday through Friday</td></tr><tr><td>0/5</td><td>8-17</td><td>*</td><td>*</td><td>MON-FRI</td><td>Run every 5 minutes Monday through Friday between 8:00 am and 5:55 pm (UTC+0)</td></tr><tr><td>0/30</td><td>20-2</td><td>*</td><td>*</td><td>MON-FRI</td><td><p>Run every 30 minutes Monday through Friday between 10:00 pm on the starting day to 2:00 am on the following day (UTC)</p><p>Run from 12:00 am to 2:00 am on Monday morning (UTC).</p></td></tr></tbody></table>

<figure><img src="https://884329393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhzNRg0B4ECiNXc093G%2Fuploads%2Fws9ItzFZTryK0PgtL3QJ%2Fimage.png?alt=media&#x26;token=98acfad4-8d10-430d-b357-2d068109f53a" alt=""><figcaption></figcaption></figure>
