---
schema_version: "1"
id: 84cd68c98a09f7ec3a5b9a4b60fd478a0694deedb52b26e727f29c05e90ba8da
title: Run an Apex Batch Process Manually
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/cg_task_manual_batch_process.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.cg_task_manual_batch_process.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e80f43a4efa8208b16bc126996836d1a3a97dfe0d4a947185db0403d199d771c
description: If you can’t wait for a scheduled Apex batch process to run at the scheduled time, you can run the batch process manually.
products:
  - Consumer Goods
release: "264"
---
# Run an Apex Batch Process Manually

If you can’t wait for a scheduled Apex batch process to run at the scheduled time, you can run the batch process manually.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience in <strong>Professional</strong>, <strong>Enterprise</strong>, and <strong>Unlimited</strong> Editions that have Consumer Goods Cloud enabled</td></tr></tbody></table>

1. From Setup, select **Developer Console**.
2. Select **Debug** | **Open Execute Anonymous Window**.
3. To run the batch process manually, enter the required Apex classes sequentially.
    
    For example:
    
    ```html
    cgc_sync.PicklistAttributesMappingBatch picklistbatch = new cgc_sync.PicklistAttributesMappingBatch(); 
    Id picklistBatchJobId = Database.executeBatch(picklistbatch, 100);
    
    cgcloud.EffectiveAccountManagerSyncBatch effAccMgrbatch = new cgcloud.EffectiveAccountManagerSyncBatch(); 
    Id effAccMgrbatchJobId = Database.executeBatch(effAccMgrbatch, 100);
    
    cgcloud.FlattenAccountHierarchyBatch flattenAccBatch = new cgcloud.FlattenAccountHierarchyBatch(); 
    Id flattenAccBatchJobId = Database.executeBatch(flattenAccBatch, 100);
    
    cgcloud.AggregatePromotionBatch aggPrmoBatch = new cgcloud.AggregatePromotionBatch(); 
    Id aggPrmoBatchJobId = Database.executeBatch(aggPrmoBatch, 100);
    
    cgcloud.AccountManagerOrgUnitBased accMgrOrgUnit= new cgcloud.AccountManagerOrgUnitBased(); 
    Id accMgrOrgUnitJobId = Database.executeBatch(accMgrOrgUnit, 100);
    
    cgcloud.AuthorizationListSetupBatch authListSetupBatch = new cgcloud.AuthorizationListSetupBatch(); 
    Id authListSetupBatchJobId = Database.executeBatch(authListSetupBatch, 100);
    ```
4. Click **Execute**.
5. To automatically open the log in the Log Inspector, select **Open Log**.
    
    After the code runs, the debug log is listed on the Logs tab.
6. To open the log, double-click it.