Scheduler Jobs

In this article

Scheduler Job Type

Defining Source and Destination Locations

Defining Object Type and Object No.

Defining frequency to run Scheduler Job

Linking Subjobs in Job

Defining Subjobs Sequence

Sublocations Restrictions

The Scheduler Job is the key to Data Replication. Scheduler Jobs are used to define activities to be run at periodic intervals. It can be to report, codeunit, batch but most importantly to replicate table data between locations. These Jobs can run at predefined intervals in the Scheduler or on click of Run Now.

Each Scheduler job is set up to send data from one database to another. The job can also be set up to run the data between multiple database locations.

The Scheduler job is set up with one or more Scheduler subjobs. The subjob represents a table that should be replicated between the hosts.

Scheduler Job Type

Scheduler job types act as templates that allow users to define default values when creating a new Scheduler Jobs. These values are automatically populated in the Scheduler Job card upon selecting Scheduler Job Type. This functionality not only simplifies job creation but also provides a convenient way to group jobs with similar purposes.

Scheduler Job Types can be used for various kinds of jobs, including replication and other miscellaneous tasks, making it easier to distinguish between jobs based on their function.

When a Scheduler Job Type is selected during the creation of a new Scheduler Job, several predefined fields are automatically inherited from the type, streamlining the setup process and ensuring consistency across similar jobs. The following fields can be configured at the Scheduler Job Type level and is transferred to the Scheduler Job:

  • From Dist. Restrictions
  • Distribution Restrictions
  • Job Type
  • Object Type
  • Object No.

Note: You can insert default Scheduler Job Types using the Insert Default Data functionality from the Retail Setup.

Defining Source and Destination Locations

For each Scheduler Job, the fields in the Location Settings FastTab enables you to control from and to which distribution locations the data should be replicated to.

From Dist. Restrictions

From distribution restriction allows you to control from which locations data should be replicated. The options are:

  • Current Location: The data will be distributed from the current location, that is the distribution location matching the store defined in the Local Store No. field in Retail Setup.
  • Single Location: The data will be distributed from a single distribution location, specified in the From-Location Code field.
  • Include List: The data will be distributed from the list of distribution locations configured in the Sender Locations List (accessible from Related -> Job -> Sender Locations List)

(To) Distribution Restrictions

Distribution restriction allows you to control whether data is replicated to all locations or only to selected ones. The options are:

  • No: No restrictions are set to distribution. The data will be distributed to all locations which are members of the Distribution Groups/Subgroups, assigned to the Store Groups in the Job Receiver Groups. (Related -> Job -> Receiver Groups)

  • Include List: An include list should be set up for the scheduler job. The data is only distributed to the locations in the Receiver Locations Include/Exclude list (Related -> Job -> Receiver Locations Include/Exclude).

  • Exclude List: An exclude list should be set up for the scheduler job. The data is distributed to all locations except those listed in the Receiver Locations Include/Exclude list.

  • Single Location: Data is distributed to one specific location only. The location can be selected either in the Receiver Locations Include/Exclude list or by selecting the location in the To-Location Code field.

Distribution Sublocations

Note: Sublocations does not work with Web Replication.

While replicating data, sublocations of distribution locations defined in To-Locations should be included in replication or not. This can be defined using the Distribution Sublocations field of the Scheduler Job card. There are three options:

  1. Excluded from Replic.: Distribution Sublocations (POS terminals) are not included when running the scheduler job.
  2. Included in Replic.: Distribution Sublocations (POS terminals) are included when running the scheduler job.
  3. Only Included in Replic.: Only Distribution Sublocations (POS terminals) are included when running the scheduler job, not the Location (store) they are located in.

Defining Object Type and Object No.

The Object Type and Object No. fields must be defined on the Scheduler Job card.

These fields are automatically populated when a Scheduler Job Type is selected, but can still be modified manually if needed.

To run replication using the latest version, codeunit 99008923 - LSC Data Distribution WS should be assigned to the job - this applies regardless of whether replication is carried out using Data Director or Web Replication.

To use Web Replication, the field Use Web Replication must be Enabled. For more information see: Web Replication.

Defining frequency to run Scheduler Job

In the Scheduler Details FastTab you control how often a job should run.

It can be defined using Time Units and Time Between Checks and any restrictions depending on the weekday or time of day can also be defined.

Note: No. of Minutes between Runs on the Job Queue Entry, for the LSC Scheduler Service, must align with the frequency set to run the Scheduler Jobs, meaning that the number of minutes on the Job Queue should be lower than the value of Time Between Checks field in the Scheduler Jobs.

Next Check Date contains the next date that the scheduler should check for data to process. This field needs to be filled to enable the replication process to run.

The program calculates a new Next Check Date when it checks for data to be processed, using the Time Between Check and Time Units fields.

For more information see: How to run the Scheduler in LS Central on the Task Scheduler

Linking Subjobs in Job

Scheduler subjobs need to be defined in the Scheduler job lines in the bottom half of the Scheduler Job page.

If multiple jobs with the same subjobs need to be defined, this can be achieved by creating one job with required subjobs. While defining the other jobs, a defined job can be attached in the field Subjobs Defined by Job which will automatically fill up the value of subjobs under that job.

Defining Subjobs Sequence

It is possible to configure the order in which the subjobs are processed. This controls the order in which tables are read from the database and also in which order they are updated at the destination sites. . This is configured on the Data Replication tab in the Scheduler Job line. The column Lock Seq. (by default hidden) can be used to set up the sequence number of execution of the subjob.

Sublocations Restrictions

While replicating data, sublocations of distribution locations defined in To-Locations should be included in replication or not. This can be defined using the Distribution Sublocations field of the Scheduler Job card. There are three options:

  • Excluded from Replic.: Distribution Sublocations (POS terminals) are not included when running the scheduler job.
  • Included in Replic.: Distribution Sublocations (POS terminals) are included when running the scheduler job.
  • Only Included in Replic.: Only Distribution Sublocations (POS terminals) are included when running the scheduler job, not the Location (store) they are located in.

Note: This feature is specific to Data Director. Sublocations will not work with Web Replication methods.