---
schema_version: "1"
id: 7d7a9dcf3a8391de8e88046217ef47f44c287bdb727380c06ece54ce9d7e049e
title: DataCloudExportScheduler Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/retail_api/cg_tpm_apex_datacloudexportscheduler.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/cg_tpm_apex_datacloudexportscheduler.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: af14891c65d99bce9ad80d5ba2f07658bee81ad659948314978cbadb3eb107ce
description: This Class is used to trigger a data cloud process on the processing service.
---
# DataCloudExportScheduler Class

This Class is used to trigger a data cloud process on the processing service.

The data cloud process prepares the data in the processing service which can be retrieved later by data cloud to the platform. This implements [System.Schedulable](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexref.meta/apexref/apex_interface_system_schedulablecontext.htm#apex_interface_system_schedulablecontext) interface and typically scheduled every 24hrs. This Apex class has one method and two constructors.

## Namespace

cgcloud

## Signature of the Method

global voidexecute(SchedulableContext sc)

This method is overridden for the System.Schedulable interface. It calls the processing service to prepare processing service tables for Data Cloud.

## Parameters

**sc: SchedulableContext** A platform class instance provided by the Salesforce platform when the class is scheduled via Apex.

## new cgcloud.DataCloudExportScheduler()

This is a no-parameter constructor. It prepares all available tables for Data Cloud in the processing service.

## DataCloudExportScheduler(List<String> tables)

Constructs the scheduler to prepare specific tables for Data Cloud.

**Parameters:** tables: List<String> - Represents the tables the customer wants to have in Data Cloud. Currently available tables include promotionmeasures, paymenttacticmeasures, dailymeasurereal, and dailymeasureint .

## Usage Example

This example shows how to schedule the DataCloudExportScheduler.

cgcloud.DataCloudExportScheduler cgDataCloudScheduler = new cgcloud.DataCloudExportScheduler();
// Example: Schedule to run daily at 11 AM
String cronExp = '0 0 11 \* \* ?'; 
String jobID = System.schedule('CgDataCloud', cronExp, cgDataCloudScheduler);

// To schedule for specific tables:
// List<String> specificTables = new List<String>{'promotionmeasures', 'dailymeasurereal'};
// cgcloud.DataCloudExportScheduler specificTableScheduler = new cgcloud.DataCloudExportScheduler(specificTables);
// String specificJobId = System.schedule('CgDataCloudSpecific', cronExp, specificTableScheduler);