# Scheduling Requests

Schedule API requests on a periodic basis. Once you launch a scheduler, we will run API requests on a period basis.

{% hint style="info" %}
If you run out of storage or credits while a scheduler is running, we will notify you via email that a request has failed.&#x20;
{% endhint %}

### How to set up automatic/scheduled queries

You can find automatic queries under the <mark style="color:blue;">**Automate**</mark> tab.

<figure><img src="https://536782565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN1gGey2zqiCs3FbMHdrl%2Fuploads%2FbikQXL8mi2FGW1hLgqEd%2FScreenshot%202024-03-21%20at%2023.01.04.png?alt=media&#x26;token=ed1e9688-3d54-498e-90b1-fe8bc0fdad44" alt="" width="375"><figcaption></figcaption></figure>

First, you need to pick the settings for your scheduler, including frequency, rule, and run on launch.

### Scheduler settings

**Frequency**

Allows you to select how often you'd like to run the request. You can set requests to run every week, day, hour, or minute. You can also click the **Cron** option in the drop-down to customize schedulers to run at specific hours or times.

**Rule**

Allows you to select what happens after every API call:&#x20;

* **Update dataset** will erase what's currently in the table and replace it with new data.
* **Expand dataset** will add new data to existing data in the table.

**Run on launch**

&#x20;If selected, we will run your query when you save the scheduler. If you uncheck this box, we will only run this query on your next scheduled request.

### Setting up parameters

After picking the settings, the parameters work the same as a normal request. To set up the scheduler, enter the settings described above, enter parameters, and click <mark style="color:blue;">Save & Run</mark>.&#x20;

#### Dynamic dates

If you want to change the input parameters for every scheduled run, you can set **dynamic dates & times** to pass into your request. To set them up, under the **Automate** tab, you'll see a checkbox **make dynamic**. Once checked, the date/time parameters will adjust every time the scheduler is run. You can pass a now() value to make the date/time parameter equal to the date/time of the request or set it to -1/2/3 days.

{% hint style="info" %}
**You cannot submit single queries or run batch requests while a scheduler runs on a dataset.** You must pause your scheduler to run single queries and batch requests.
{% endhint %}
