---
schema_version: "1"
id: 27246579330221792af63bccaa79231bad497835e140a9093c7f46f827561523
title: Batch Framework Initialization (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_batch_framework_initialization.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_batch_framework_initialization.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: f39a50581adfb1ecb06e0c811272c833cbf239eed1bb15897f4337c091c09989
description: For the managed package runtime, the Vlocity batch framework launches the jobs that are defined in the Vlocity Scheduled Job custom object. To start the Vlocity batch framework, you must execute Apex code, which creates an instance of the framework and invokes its start method.
products:
  - Omnistudio
release: "264"
---
# Batch Framework Initialization (Managed Package)

For the managed package runtime, the Vlocity batch framework launches the jobs that are defined in the Vlocity Scheduled Job custom object. To start the Vlocity batch framework, you must execute Apex code, which creates an instance of the framework and invokes its start method.

![Managed Package app icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/resources-global/_corporate/images/managedpackageicon.png) This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see [Omnistudio Help](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_standard.htm&language=en_US).

```
VlocityBatchFramework batchFramework = new VlocityBatchFramework();
batchFramework.startBatchScheduler('<frequency>');
```

These commands create a [CronTrigger](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_crontrigger.htm) (scheduled job) with the name VlocityScheduledJob.

The Frequency parameter specifies how often the batch framework checks for jobs to launch. To ensure that jobs are executed on the desired schedule, specify a frequency greater than or equal to that of the highest-frequency job. For example, if you have a job that is scheduled to run hourly, specify `Hourly` or `15 Minutes` for the batch framework frequency. Note that the timing of job execution is controlled entirely by the batch framework, and jobs might not be executed at precise intervals.

```
VlocityBatchFramework batchFramework = new VlocityBatchFramework();
batchFramework.startBatchScheduler('15 Minutes');
```