---
schema_version: "1"
id: 0426382853d099dc04f2e16f459311113c68ea274a11522abc736a72167ad252
title: Terminate Long-Running Document Generation Requests
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/doc_gen_schedule_job_to_terminate_inprogress_docgen_requests.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.doc_gen_schedule_job_to_terminate_inprogress_docgen_requests.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 907261a1326644554fa7b7fc13b57e57c6f9bb59c98c60f69aaf3f7046a2df9a
description: Use the TerminateDocGenRequestCronJob scheduled job to maintain server-side document generation performance by preventing long-running requests from affecting system efficiency.
products:
  - Omnistudio Doc Gen
release: "264"
---
# Terminate Long-Running Document Generation Requests

Use the TerminateDocGenRequestCronJob scheduled job to maintain server-side document generation performance by preventing long-running requests from affecting system efficiency.

| REQUIRED EDITIONS |
| --- |
| Available in: Lightning Experience |
| Available in: **Professional**, **Enterprise**, **Unlimited**, and **Developer** Editions with Omnistudio Document Generation |

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="vertical-align:top;" id="d27503e84">USER PERMISSIONS NEEDED</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="USER PERMISSIONS NEEDED" class="slds-cell-wrap" style="vertical-align:top;" headers="d27503e84 "> To run the cron job:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d27503e84 ">CLM Admin</td>

          </tr>
        </tbody>
      </table>

Prevent document generation requests from running indefinitely by turning on the time-out setting. Specify a time limit for document generation requests. Any individual or batch document generation requests that exceed the specified time limit, but are still in progress, are terminated and marked as failed. The default timeout is set to 6 hours.

1. From Setup, in the Quick Find box, enter Document Generation, and then select **Document Generation Settings**.
2. Click the dropdown next to the Docgen label, and then select **Edit**.
3. Turn on the Enable InProgress DocGen Request Time Out setting.
4. To specify the time interval (in hours) after which the long running document generation requests are terminated, enter a number in **InProgress DocGen Request Time Out (hrs)**.
5. Click **Continue**.
    
    The TerminateDocGenRequestCronJob is added to the Scheduled Jobs list.

Individual or batch document generation requests that exceed your specified time limit are terminated and marked as failed.