Cloud Replicator Documentation
Index

Job Queue Setup

Cloud Replicator integrates with Business Central's Job Queue to automate replication on a schedule. This guide explains how to configure automated replication.

Overview

The Job Queue allows you to:

  • Schedule replication to run at specific times
  • Automate recurring replications
  • Run replication in the background
  • Monitor job execution history

Replication Codeunit

Cloud Replicator provides a codeunit specifically designed for Job Queue execution. You must use this codeunit (not the main engine codeunit) when scheduling replication through the Job Queue, because it accepts the Job Queue Entry's Parameter String as a table filter:

Property Value
Codeunit ID 70319900
Name Cloud Replicator JQ Runner EFQ
Function Replicates active table mappings, optionally filtered by Table No. via the Parameter String

The runner always limits replication to table mappings marked Active. The main engine codeunit (70319891) is used for manual runs from the Table Mapping page and is not intended to be scheduled directly in the Job Queue.

Parameter String (Table Filter)

The Parameter String field on the Job Queue Entry lets a single job target a specific set of tables. It is applied as a Business Central filter on the Table No. of the active table mappings:

Parameter String Result
(empty) Replicate all active table mappings
18 Replicate only the Customer table (Table 18)
18&#|;36&#|;37 Replicate Customer, Sales Header, and Sales Line
18..50 Replicate active mappings for tables 18 through 50

This makes it easy to schedule different tables at different frequencies — see Implementing Tiered Schedules — without maintaining separate Active flags.

Creating a Job Queue Entry

Step 1: Open Job Queue Entries

  1. Search for "Job Queue Entries" in Business Central
  2. Open the Job Queue Entries page

Step 2: Create New Entry

  1. Click New to create a new entry
  2. Fill in the required fields (see below)

Step 3: Configure Basic Settings

Field Value
Object Type to Run Codeunit
Object ID to Run 70319900
Parameter String (Optional) Table No. filter — leave blank for all active mappings
Description Cloud Replicator - Scheduled Replication
Job Queue Category Code (Optional) Create or select a category

Step 4: Configure Schedule

Set when the job should run:

Field Purpose
Earliest Start Date/Time First run time
Recurring Job Check if job should repeat
Run on Mondays-Sundays Select active days
Starting Time Daily start time
Ending Time Stop trying after this time
No. of Minutes between Runs Frequency (e.g., 60 for hourly)

Step 5: Configure Error Handling

Field Recommended Value
Maximum No. of Attempts to Run 3
Rerun Delay (sec.) 60
Inactivity Timeout Period 0 (no timeout)

Step 6: Activate the Job

  1. Review all settings
  2. Click Set Status to Ready in the action bar
  3. The job is now scheduled

Example Configurations

Hourly Replication (Business Hours)

Object Type to Run: Codeunit
Object ID to Run: 70319900
Parameter String: (blank - all active tables)
Description: Cloud Replicator - Hourly
Recurring Job: Yes
Run on Monday-Friday: Yes
Run on Saturday-Sunday: No
Starting Time: 8:00 AM
Ending Time: 6:00 PM
No. of Minutes between Runs: 60

Nightly Full Sync

Object Type to Run: Codeunit
Object ID to Run: 70319900
Parameter String: (blank - all active tables)
Description: Cloud Replicator - Nightly Sync
Recurring Job: Yes
Run on Monday-Sunday: Yes
Starting Time: 2:00 AM
Ending Time: 4:00 AM
No. of Minutes between Runs: 0 (runs once)

Frequent Updates (Every 15 Minutes)

Object Type to Run: Codeunit
Object ID to Run: 70319900
Parameter String: 18|36|37 (only critical tables)
Description: Cloud Replicator - 15 Min Updates
Recurring Job: Yes
Run on Monday-Sunday: Yes
Starting Time: 12:00 AM
Ending Time: 11:59 PM
No. of Minutes between Runs: 15

Understanding Job Execution

What Happens When Job Runs

  1. Job Queue starts codeunit 70319900
  2. The runner reads the active table mappings (filtered by the Parameter String, if set)
  3. For each mapping and company:
    • Creates replication parameter records
    • Starts background sessions (up to Engine Count)
  4. Background sessions process the replications
  5. Job Queue entry completes
  6. Background replication may continue after job completes

Job Duration

The Job Queue entry completes when:

  • All replication jobs are queued
  • Not when all replication is finished

Actual replication continues in background sessions. Monitor the Engine Pulse or Replication Log for completion status.

Session Timeouts

Configure Engine Timeout in Cloud Replicator Setup to control how long individual replication engines can run before timing out.

Monitoring Job Queue

Viewing Job Status

  1. Open Job Queue Entries
  2. Review the Status column:
    • Ready: Waiting to run
    • In Process: Currently running
    • On Hold: Paused
    • Error: Failed

Viewing Job History

  1. Open Job Queue Entries
  2. Select your replication job
  3. Click Log Entries in the action bar
  4. View execution history with start/end times

Error Handling

If a job fails:

  1. Check Job Queue Log for error messages
  2. Check Cloud Replicator Replication Log for details
  3. Common issues:
    • License expired
    • Cloud credentials invalid
    • Network connectivity issues

Managing Job Queue

Pausing Replication

To temporarily stop scheduled replication:

  1. Open Job Queue Entries
  2. Select the Cloud Replicator entry
  3. Click Set Status to On Hold

Resuming Replication

  1. Open Job Queue Entries
  2. Select the Cloud Replicator entry
  3. Click Set Status to Ready

Running Manually

To run the job immediately:

  1. Open Job Queue Entries
  2. Select the Cloud Replicator entry
  3. Click Run Once

Deleting a Job

  1. Open Job Queue Entries
  2. Select the Cloud Replicator entry
  3. Press Delete or click Delete action
  4. Confirm deletion

Advanced Configuration

Using Job Queue Categories

Create categories to group related jobs:

  1. Search for "Job Queue Categories"
  2. Create a new category (e.g., "DATA-REPL")
  3. Assign to your replication jobs
  4. Use for filtering and organization

Multiple Replication Jobs

You may want separate jobs for different purposes:

Job Schedule Purpose
Frequent Updates Every 15 min Critical tables
Hourly Sync Hourly Standard tables
Nightly Full 2:00 AM Complete resync

Note: Ensure jobs don't overlap to avoid conflicts.

User Context

Job Queue entries run under a specific user:

  • Ensure the user has required permissions
  • Consider creating a dedicated service account
  • User must have Cloud Replicator and data permissions

Troubleshooting

Job Stays "In Process"

  • Check if replication is still running (Engine Pulse)
  • Verify engine timeout is appropriate
  • Check for background sessions that may be stuck
  • Restart the job if necessary

Job Runs but No Data Replicates

  • Check if table mappings are set to Active
  • Verify cloud credentials in Setup
  • Review Replication Log for errors
  • Test with Manual Run from Table Mapping page

Permission Errors

  • Verify Job Queue user has:
    • Cloud Replicator permissions
    • Read access to replicated tables
    • Execute permission on codeunit 70319900 (and the underlying engine codeunit 70319891)

Jobs Not Starting

  • Check Job Queue Entry status
  • Verify schedule configuration
  • Ensure Business Central Job Queue is running
  • Check for conflicting jobs

Best Practices

Schedule During Off-Peak Hours

Run large replications outside business hours to minimize system impact.

Start with Lower Frequency

Begin with less frequent runs, increase based on data freshness needs.

Monitor Initial Runs

Watch the first few scheduled runs to ensure smooth operation.

Keep Logs

Job Queue log entries help troubleshoot historical issues.

Use Appropriate Timeouts

Set engine timeout long enough for largest tables.