# Automatic Imports

To run imports automatically, you can use one of three methods:

### 1. You can use the ExpressionEngine CLI tool (Recommended):

<pre><code><strong>php system/ee/eecli.php import:run --import_id=2 --limit=1
</strong></code></pre>

To run automatically, you will need to set up a cron to call the command. For more details see: [Running imports using cron](/datagrab/docs/automatic-imports/importing-with-cron.md).

### 2. You can create a template, and include the tag:

```
{exp:datagrab:run_saved_import id="2"}
```

(this will run the import with the id of 2). The import will run when this template is viewed in the browser.

### 3. You can directly call the URL:

```
http://yoursite.com/index.php?ACT=n&id=2
```

Where n is the action id assigned to DataGrab. This is displayed on the module’s homepage.

###


---

# Agent Instructions: 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:

```
GET https://docs.boldminded.com/datagrab/docs/automatic-imports.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
