> 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-xsoar-8-on-prem/8.9/configure-cortex-xsoar/incident-configuration/configure-incident-export-and-delete/schedule-incident-export-and-delete.md).

# Schedule incident export and delete

You can schedule the following actions in Cortex XSOAR:

* Export incidents
* Delete incidents
* Export and then delete incidents

{% hint style="warning" %}

### Danger

If you want to export incidents, you must have an external storage solution configured. For more information, see [Configure access to external storage](/cortex-xsoar-8-on-prem/8.9/configure-cortex-xsoar/incident-configuration/configure-incident-export-and-delete/configure-access-to-external-storage.md).
{% endhint %}

{% hint style="info" %}

### Note

* The first time incidents are exported, the process may take multiple days or weeks, depending on the number of incidents and the amount of data. The previous export must be completed before the system begins another export.
* To stop an existing export process, you must make a `POST` request to the API endpoint: `/xsoar/exdelete-incidents/job/abort`.
* If an export fails, the Instance Admin receives an email notification. To enable or disable notification settings, click on your username and select **User Preferences** → **Notifications** → **Other Notifications** → **Scheduled export and delete failure**.
* Once an incident has been exported, it is not exported again, even if it remains in the system and is modified after the export.
  {% endhint %}

After you enable scheduling, the **Export and Delete Incidents** page displays the date and time of the next scheduled procedure. After incidents are exported, deleted, or exported and then deleted, the page displays the date and time of the last successful procedure. If a procedure is currently in progress, the status is displayed.

<details>

<summary>Schedule incident export</summary>

1. Go to **Settings & Info** → **Settings** → **System** → **Export Incidents**.
2. Toggle the button to **Enable scheduled exports**.
3. Select **Export**.
4. Select the time range. For example, if you select three months, all incidents created more than three months ago are exported. The minimum value is one month.
5. Select whether to **Include incident attachments**.
6. Choose the frequency, days, and time.
7. Choose an existing external storage option.
8. Enter the relative path where the data is stored. For example, if the data stored in the `export_incidents` top-level folder in an Amazon S3 bucket, the relative path is `export_incidents`.
9. **Save**.

</details>

<details>

<summary>Schedule incident deletion</summary>

1. Go to **Settings & Info** → **Settings** → **System** → **Export Incidents**.
2. Toggle the button to **Enable scheduled exports**.
3. Select **Delete**.
4. Select the time range. For example, if you select three months, all incidents created more than three months ago are deleted. The minimum value is one month.
5. Choose the frequency, days, and time.
6. **Save**.

</details>

<details>

<summary>Schedule incident export and deletion</summary>

If you choose to export and then delete incidents, no incident is deleted until it has been exported.

1. Go to **Settings & Info** → **Settings** → **System** → **Export Incidents**.
2. Toggle the button to **Enable scheduled exports**.
3. Select **Export then delete**.
4. Select the time range. For example, if you select three months, all incidents created more than three months ago are exported and then deleted. The minimum value is one month.
5. Select whether to **Include incident attachments**.
6. Choose the frequency, days, and time.
7. Choose an existing external storage option.
8. Enter the relative path where the data is stored. For example, if the data stored in the `export_incidents` top-level folder in an Amazon S3 bucket, the relative path is `export_incidents`.
9. **Save**.

</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-xsoar-8-on-prem/8.9/configure-cortex-xsoar/incident-configuration/configure-incident-export-and-delete/schedule-incident-export-and-delete.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.
