> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/cortex-xdr-3.x/cortex-xdr-3.x-documentation/cortex-xdr-xql/build-xql-queries/overview-of-the-query-center/edit-and-rerun-queries-in-query-center.md).

# Edit and rerun queries in Query Center

{% hint style="info" %}

### Notice

Building Cortex Query Language (XQL) queries in the Query Builder requires a Cortex XDR Pro license.
{% endhint %}

From the **Query Center** you can take action on the **Completed** and **In Progress** queries that are running on your tenant.

Right-click a query to see the available options, where some of the options differ depending on the type of query you've selected. The pivot (right-click) options described below are some of the ones that may require further explanation.

<details>

<summary>View the results of a query</summary>

1. Select **Investigation** → **Query Center**.
2. Identify the query by looking in the **Query Description** column.

   The **Query Description** column displays the parameters that were defined for a query. If necessary, use the **Filter** to reduce the number of queries that Cortex XDR displays.

   Queries that were created from a Query Builder template are prefixed with the template name.
3. Right-click anywhere in the query row and select **Show results**.

   You have the option to **Show results in new tab** or **Show results in same tab**.
4. (Optional) **Export to file** to export the results to a tab-separated values (TSV) file.
5. (Optional) Perform additional investigation on the alerts.

   Right-click a value in the results table to see the options for further investigation.

</details>

<details>

<summary>Modify a query</summary>

After you run a query, you might need to change your search parameters to refine the search results or correct a search parameter.

* For queries created in XQL, type your changes in the XQL query field where the original query is listed and the results are displayed in the **Query Results** tab. After modifying the query, you can run, schedule, or save the query.
* For queries created with a Query Builder template, the defined parameters are shown at the top of the **Results** page. Select **Back to edit** to modify the query with the template format or **Continue in XQL** to open the query in XQL.

</details>

<details>

<summary>Schedule a query to run</summary>

You can either schedule an XQL query to run on or before a specific date. Cortex XDR creates a new query in the **Query Center**, and when the query completes, it displays a notification in the notification bar.

#### How to schedule a query

1. In the **Query Center**, right-click anywhere in the query and then select **Schedule**.
2. Choose a schedule option and the date and time that the query should run:
   * **Run one time query on a specific date**
   * **Run query by date and time**: Schedule a recurring query.
3. Click **OK** to schedule the query.

   Cortex XDR creates a new query and schedules it to run on or by the selected date and time.
4. View the status of the scheduled query on the **Scheduled Queries** page.

   You can also make changes to the query, edit the frequency, view when the query will next run, or disable the query. For more information, see [Manage scheduled queries](/cortex-xdr-3.x/cortex-xdr-3.x-documentation/investigate-and-respond-to-incidents/build-xql-queries/manage-scheduled-queries.md).

</details>

<details>

<summary>Cancel a query</summary>

{% hint style="info" %}

### Note

You can cancel your own queries. To cancel queries run by other users, you must have **View/Edit** permissions for **Configurations** → **Query Management**. By default, Instance administrators have **View/Edit** permission.
{% endhint %}

On the **Active Queries** tab you can cancel one or more **In Progress** queries. You might want to cancel long-running queries, or cancel queries to reduce tenant consumption. If query limits are applied to your tenant and you exceed the defined limit of concurrent running queries, new queries are blocked until the number of active queries falls below the threshold. Canceling active queries allows you to unblock and run new queries.

#### How to cancel a query

1. Select **Investigation** → **Query Center** → **Active Queries**.
2. Select one or more queries and click **Cancel Selected Queries**.

{% hint style="info" %}

### Note

* Cancelled queries show a Canceled status. You can see details of all canceled queries in the Query History tab. &#x20;
* You cannot cancel correlation rule queries.
* If you cancel a scheduled query, only the current query is cancelled. Future recurrences of the scheduled query are not affected.
  {% endhint %}

</details>


---

# 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://cortex-docs.paloaltonetworks.com/cortex-xdr-3.x/cortex-xdr-3.x-documentation/cortex-xdr-xql/build-xql-queries/overview-of-the-query-center/edit-and-rerun-queries-in-query-center.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.
