Skip to content

Scheduling Exports

Bert Verbeek edited this page Feb 19, 2026 · 2 revisions

Scheduling Exports

This guide explains how to automate Business Central data exports using Job Queue entries for recurring, scheduled execution.

📋 Table of Contents

Overview

The Job Queue in Business Central allows you to schedule background tasks to run automatically at specified intervals. For bc2adls, you can schedule:

  • ✅ Regular exports of all configured tables
  • ✅ Selective exports by category or specific tables
  • ✅ Different schedules for different table groups
  • ✅ Company-specific export schedules

Job Queue Basics

What is a Job Queue?

A Job Queue Entry is a scheduled task in Business Central that:

  • Runs in the background without user interaction
  • Can be scheduled to run at specific times or intervals
  • Can be set to run in specific companies
  • Automatically retries on failure (configurable)
  • Logs execution history for monitoring

Prerequisites

  • ✅ bc2adls extension installed
  • ✅ Export configuration completed
  • ✅ Tables configured for export
  • ✅ User with permission to create Job Queue Entries

📖 Learn more about Job Queues


Simple Scheduling (All Tables)

This method schedules export of all enabled tables in the current company.

Step 1: Open Export Page

  1. Open Business Central
  2. Search for Export to Azure Data Lake Storage (Page 82560)
  3. Ensure your tables are configured and enabled

Step 2: Schedule Export

  1. Click the Schedule export action in the ribbon
  2. A Job Queue Entry is automatically created
  3. The system opens the Job Queue Entry for configuration

Job Queue Entry

Step 3: Configure Job Queue Entry

Configure the following fields:

Field Description Example Value
Object Type to Run Type of object Codeunit
Object ID to Run ID of the export codeunit 82560 (ADLSE Execution)
Object Caption to Run Name of the codeunit ADLSE Execution
Recurring Job Enable for automatic re-run ☑️ Yes
Run on Mondays through Run on Sundays Days to run Select desired days
Starting Time Time to start execution 01:00:00 (1 AM)
Ending Time Latest time to start 23:59:59
No. of Minutes between Runs Frequency 60 (hourly)
Maximum No. of Attempts to Run Retry count on failure 3
Rerun Delay (sec.) Wait before retry 30

Step 4: Set Company (if needed)

If you want this job to run for a specific company:

  1. Set Run in User's Current Company to No
  2. Fill in Company Name field with the target company

Step 5: Activate

  1. Set Status to Ready
  2. The job will now run according to the schedule
  3. Monitor in Job Queue Entries page

Advanced Scheduling (By Category or Table)

Use this method to schedule specific tables or categories at different frequencies.

Use Cases

  • Export transactional tables (orders, invoices) every hour
  • Export master data (customers, items) daily
  • Export configuration tables weekly
  • Export large tables during off-hours

Step 1: Assign Categories to Tables

  1. Open Export to Azure Data Lake Storage page
  2. For each table in the grid, set Export in a category:
    • Example categories: "Hourly", "Daily", "Weekly", "Large", "Master"
  3. Categories are text fields - use any naming convention

Step 2: Create Job Queue Entry

  1. Search for Job Queue Entries
  2. Click New
  3. Configure the following:
Field Value
Object Type to Run Report
Object ID to Run 82561
Object Caption to Run ADLSE Schedule Task Assignment

Step 3: Configure Report Options

  1. Click the Report Request Page Options action in the ribbon
  2. The report request page opens

Report Options

  1. Configure filters:

Option A: Export by Category

  • Set Category filter to your desired category (e.g., "Hourly")
  • Leave Table ID blank

Option B: Export Specific Tables

  • Set Table ID filter to specific IDs (e.g., "18|36|37" for Customer, Sales Header, Sales Line)
  • Leave Category blank

Option C: Combination

  • Use both filters for fine-grained control
  • Example: Category "Master" AND Table ID "18..50" (range)
  1. Click OK to save

Step 4: Set Schedule

Configure the same scheduling fields as in Simple Scheduling:

  • Recurring Job: Yes
  • Days to run
  • Starting Time
  • No. of Minutes between Runs

Step 5: Set Company

Set the Company Name if needed (see Simple Scheduling).

Step 6: Activate

Set Status to Ready.

Example: Multiple Schedules

Create separate Job Queue Entries for different needs:

Entry Category Schedule Purpose
Entry 1 Hourly Every hour, 6 AM - 6 PM Transactional data
Entry 2 Daily Once daily at 11 PM Master data
Entry 3 Weekly Sundays at 2 AM Large archive tables
Entry 4 (Table IDs: 18,36,37) Every 15 minutes Critical sales tables

Multi-Company Scheduling

There are two approaches for scheduling multi-company exports:

Option 1: Multi-Company Export Page (Recommended)

Use the Export Companies to Azure Data Lake Storage page for centralized multi-company management. With this approach, you only need to create one Job Queue entry that automatically iterates across all selected companies.

  1. Search for Export Companies to Azure Data Lake Storage
  2. Add all companies you want to export
  3. Click the Schedule export action
  4. Configure the schedule (description, start time, recurrence, days)
  5. The single Job Queue entry handles all companies sequentially

Advantages:

  • ✅ Only one Job Queue entry needed (instead of one per company)
  • ✅ Centralized overview of all companies and their export status
  • ✅ No risk of resource contention — companies are exported sequentially
  • ✅ Job status visible directly on the page per company

📖 Read the full Multi-Company Export guide for detailed setup instructions.

Option 2: Per-Company Job Queue Entries

Alternatively, create separate Job Queue Entries for each company. This gives you independent schedules and parallel execution, but requires more setup.

For each company:

  1. Create a Job Queue Entry (Simple or Advanced method)
  2. Set Run in User's Current Company to No
  3. Set Company Name to the target company name
  4. Configure schedule
  5. Set Status to Ready

Tip: Stagger schedules to avoid resource contention:

  • Company A: Start at :00 (e.g., 1:00, 2:00, 3:00)
  • Company B: Start at :15 (e.g., 1:15, 2:15, 3:15)
  • Company C: Start at :30 (e.g., 1:30, 2:30, 3:30)

Comparing the Two Approaches

Aspect Multi-Company Export Page Per-Company Job Queues
Job Queues needed 1 1 per company
Execution Sequential (one company at a time) Parallel (if staggered)
Setup effort Low Higher
Independent schedules No (same schedule for all) Yes
Centralized monitoring Yes No (check each company)

Multi-Company Best Practices

✅ Use the Multi-Company Export page if you want a simple, centralized setup ✅ Use per-company Job Queues if you need different schedules per company ✅ Monitor capacity - ensure BC can handle concurrent exports ✅ Same configuration - ensure all companies have tables enabled ✅ Export schema first - run initial export for each company manually ✅ Different priorities - schedule critical companies more frequently (per-company approach only)


Best Practices

Scheduling Strategy

Frequency Guidelines

Table Type Update Frequency Suggested Schedule
Transactional (Orders, Invoices, Payments) High Hourly
Master Data (Customers, Items, Vendors) Medium Every 4-6 hours or daily
Configuration (Setup tables) Low Daily or weekly
Historical (Posted documents, ledger entries) Medium Every 2-4 hours
Large/Archive Low Weekly or monthly

Time-of-Day Considerations

✅ Off-peak hours:

  • Large table exports
  • Initial full exports
  • Resource-intensive consolidations

✅ Business hours:

  • Frequent small updates (transactional data)
  • Only if read-only replica is enabled

✅ End-of-day:

  • Master data updates
  • Daily consolidation
  • Data quality checks

Performance Optimization

✅ Enable Read-Only Replica (BC 21+)

  • Go to Feature Management
  • Enable "Report read-only data access"
  • Exports read from replica database
  • Minimizes production impact

✅ Use Categories

  • Group tables by update frequency
  • Schedule high-change tables more frequently
  • Schedule static tables less frequently

✅ Stagger Exports

  • Don't export all tables simultaneously
  • Spread load across time
  • Reduce peak resource usage

✅ Monitor and Adjust

  • Review Job Queue Log entries
  • Identify long-running exports
  • Adjust schedules based on patterns

Error Handling

✅ Configure retries:

  • Set Maximum No. of Attempts to Run to 2-3
  • Set Rerun Delay to 30-60 seconds
  • Avoids transient failures

✅ Monitor failures:

  • Review Job Queue Log Entries
  • Check error messages
  • Fix underlying issues

✅ Alerts:

  • Set up notifications for failed jobs (via Power Automate or AL code)
  • Review failed exports daily

Maintenance

✅ Regular review:

  • Review Job Queue Entries monthly
  • Remove obsolete schedules
  • Adjust frequencies based on usage

✅ Log cleanup:

  • Job Queue Log Entries accumulate
  • Periodically clean old entries
  • Keep recent history for troubleshooting

✅ Documentation:

  • Document schedule strategy
  • Note category purposes
  • Track schedule changes

Monitoring Scheduled Jobs

View Job Queue Entries

  1. Search for Job Queue Entries
  2. View all scheduled jobs
  3. Key fields:
    • Status: Ready, On Hold, Error
    • Scheduled to Run: Next execution time
    • Last Ready State: When job was last active

View Job Queue Log Entries

  1. From Job Queue Entries, select an entry
  2. Choose Show Log Entries action
  3. View execution history:
    • Start time and duration
    • Status (Success, Error)
    • Error messages
    • Number of processed tables

Check Export Status

  1. Open Export to Azure Data Lake Storage page
  2. Review Last exported status for each table
  3. Check Last Timestamp to verify recent exports
  4. Review Error Message if status is Failed

Telemetry

If telemetry is enabled:

  1. Access Application Insights
  2. Query for bc2adls events
  3. View detailed execution metrics:
    • Export duration by table
    • Success/failure rates
    • Performance trends

Troubleshooting

Job Not Running

Problem: Job Queue Entry status is Ready but not executing

Solutions:

  • ✅ Check Job Queue Status in BC
    • Search for "Job Queue - User Status"
    • Ensure status is "Running"
  • ✅ Verify schedule settings (days, times)
  • ✅ Check if Earliest Start Time is in the future
  • ✅ Review system capacity (concurrent job limits)

Job Failing

Problem: Job Queue Entry status shows Error

Solutions:

  • ✅ View Job Queue Log Entries for error details
  • ✅ Check export configuration is valid
  • ✅ Verify credentials haven't expired
  • ✅ Ensure network connectivity to Azure/Fabric
  • ✅ Review table configuration (fields, permissions)

Exports Taking Too Long

Problem: Job runs for hours, blocks other jobs

Solutions:

  • ✅ Export fewer tables per job (use categories)
  • ✅ Enable Skip row version sorting for large tables
  • ✅ Reduce Max payload size setting
  • ✅ Schedule during off-peak hours
  • ✅ Export large tables separately

Concurrent Job Conflicts

Problem: Multiple jobs trying to export same data

Solutions:

  • ✅ Stagger company schedules
  • ✅ Use different categories for different schedules
  • ✅ Avoid overlapping schedules
  • ✅ Monitor Job Queue capacity limits

Advanced: Programmatic Scheduling

For advanced scenarios, you can create Job Queue Entries programmatically via AL code:

procedure CreateExportJobQueueEntry()
var
    JobQueueEntry: Record "Job Queue Entry";
begin
    JobQueueEntry.Init();
    JobQueueEntry."Object Type to Run" := JobQueueEntry."Object Type to Run"::Codeunit;
    JobQueueEntry."Object ID to Run" := Codeunit::"ADLSE Execution";
    JobQueueEntry."Recurring Job" := true;
    JobQueueEntry."Run on Mondays" := true;
    JobQueueEntry."Run on Tuesdays" := true;
    JobQueueEntry."Run on Wednesdays" := true;
    JobQueueEntry."Run on Thursdays" := true;
    JobQueueEntry."Run on Fridays" := true;
    JobQueueEntry."Starting Time" := 010000T; // 1 AM
    JobQueueEntry."No. of Minutes between Runs" := 60;
    JobQueueEntry.Status := JobQueueEntry.Status::Ready;
    JobQueueEntry.Insert(true);
end;

Summary

Scheduled exports via Job Queue provide:

  • ✅ Automated, hands-off operation
  • ✅ Flexible scheduling options
  • ✅ Multi-company support
  • ✅ Category-based granular control
  • ✅ Built-in retry and error handling
  • ✅ Comprehensive logging and monitoring

Next Steps:

  1. Start with simple scheduling for all tables
  2. Monitor execution and performance
  3. Refine with categories based on usage patterns
  4. Implement multi-company schedules as needed
  5. Regularly review and optimize

Related: Execution Guide | Power Automate Integration | FAQs | Back to Home

Clone this wiki locally