> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sync.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scheduling Jobs

CData Sync has a built-in scheduler that enables you to control the frequency of your job run. On the **Overview** tab for your job, set the job to run automatically by configuring the scheduler from the **Schedule** category in the right pane.

## Configuring the Scheduler

To configure the scheduler:

1. Click **Add Schedule** in the **Schedules** category to open the **Add Schedule** dialog.

   ![Adding a schedule in the Add Schedule dialog](https://mintcdn.com/cdata-sync/FaXQgwCWYQjGfVUG/26.4/images/Scheduling-Jobs_configuring-the-scheduler_1.png?fit=max\&auto=format\&n=FaXQgwCWYQjGfVUG\&q=85\&s=282d7bb00fa81555b7fae4fcb9ed76a2)

2. Select the interval type and frequency. The name of the frequency drop-down list changes based on your selected interval type (for example, if the interval is **Minute**, the frequency list is named **Every**; if the interval is **Daily**, the frequency list is named **Time of Day**; and so on).

   The following list provides the values that you can select for each interval type:

   * **Minute:** Choose intervals of 1, 5, 10, 15, 20, or 30 minutes in the **Minutes** field. The **Minute** interval starts on the hour. For example, if you choose **Every 10 Minutes**, your job will be scheduled to execute at :00, :10, :20, :30, and so on.
   * **Hourly:** Choose specific minutes past an hour in the **Minute Past the Hour** field.
   * **Daily:** Choose a specific time of day in the **Time** field.
   * **Weekly:** Choose a specific day of the week and a time from the **Day** and **Time** fields.
   * **Monthly:** Choose a specific day of the month and time from the **Day** and **Time** fields.
   * **Custom:** Enter a Cron statement in the **Cron Expression** field.

   > [!NOTE]
   >
   > When the job that is currently running takes longer than the scheduled interval, Sync skips the next run. For example, if you set a job to run every 10 minutes but one run takes 15 minutes to complete, the next run is skipped. The following table illustrates this particular example, but the skip concept applies to all of the interval types.

   | **Run Number** | **Scheduled Start Time** | **End Time** | **Results** |
   | :-: | :-: | :-: | :-: |
   | 1 | 12:00 | 12:07 | SUCCESSFUL |
   | 2 | 12:10 | 12:25 | SUCCESSFUL |
   | 3 (skipped) | 12:20 | | SKIPPED |
   | 4 | 12:30 | 12:38 | SUCCESSFUL |

3. Click **Add Schedule** to save your configuration.

After you save the configuration, the **Schedule** category on the **Overview** tab displays the job-run interval that you defined. A blue switch appears to the right of **Schedule**, which means that the scheduler is enabled. You can toggle that switch to enable or disable the scheduler. When you disable the scheduler, the switch is gray.

If you need to modify or remove the schedule, click the options icon (three vertical dots) and select **Edit** to modify the schedule or **Remove** to delete the schedule. If you need additional help, click the **Documentation** icon (![Documentation icon](https://mintcdn.com/cdata-sync/88MkaeOw70WElG5o/26.4/images/question-mark-icon.png?fit=max\&auto=format\&n=88MkaeOw70WElG5o\&q=85\&s=e53db0ccfdf4c5ad71dc9b1fcec30352)).

![Edit and documentation icons for the scheduler](https://mintcdn.com/cdata-sync/FaXQgwCWYQjGfVUG/26.4/images/Scheduling-Jobs_configuring-the-scheduler_2.png?fit=max\&auto=format\&n=FaXQgwCWYQjGfVUG\&q=85\&s=29d9519159d2cfd3a379e533730009a7)

## Configuring Multiple Schedules for a Job

You can configure up to three schedules for a Sync job, allowing it to run at different frequencies based on the day or time. For example, you can configure a job to run hourly on weekdays and once a week on Saturdays.

To add another schedule to your job:

1. Click **Add Schedule** in the **Schedules** category on the job's **Overview** tab.

   ![Jobs Scheduler](https://mintcdn.com/cdata-sync/FaXQgwCWYQjGfVUG/26.4/images/Scheduling-Jobs_configuring-multiple-schedules-for-a-job_1.png?fit=max\&auto=format\&n=FaXQgwCWYQjGfVUG\&q=85\&s=d307b2c9f1e55ee470fc9e7329398f4c)
2. Configure the new schedule rule that you want to add in the **Add Schedule** dialog, as shown in this example:

   ![Configure a new schedule rule](https://mintcdn.com/cdata-sync/FaXQgwCWYQjGfVUG/26.4/images/Scheduling-Jobs_configuring-multiple-schedules-for-a-job_2.png?fit=max\&auto=format\&n=FaXQgwCWYQjGfVUG\&q=85\&s=f1fd17781a49158e144a11042d259193)
3. Click **Add Schedule** and the new schedule appears in the **Schedules** category.

   ![New schedule appears in the scheduler](https://mintcdn.com/cdata-sync/FaXQgwCWYQjGfVUG/26.4/images/Scheduling-Jobs_configuring-multiple-schedules-for-a-job_3.png?fit=max\&auto=format\&n=FaXQgwCWYQjGfVUG\&q=85\&s=3752747657f35f2c1fd1ee63850e6ac0)

   The scheduler lists all schedules for the job and indicates how many are enabled (for example, **Schedules (2 of 3)**). Each schedule rule has its own toggle, allowing you to enable or disable it independently of the other rules.

> [!NOTE]
>
> When a job has multiple schedules, **more frequent schedules can prevent less frequent schedules from running as expected.** For example, if you configure a job to run every 5 minutes and also every hour, the hourly schedule might never run because each 5-minute execution resets the time used to determine when the job should run next. Keep this behavior in mind when configuring multiple schedules.

## Scheduling a Recurring Re-Sync

When you configure a schedule rule, you can specify that rule to trigger a re-sync instead of a regular job run. This automates data-integrity maintenance for sources that do not report deletes, eliminating the need to manually pause and resume your schedule to run periodic full re-syncs.

To enable recurring re-sync:

1. Add a schedule as described in the previous sections. After you set your schedule in the **Add Schedule** dialog, select the **Recurring Re-Sync Tasks Schedule** checkbox. With this selection, three additional required fields appear in the dialog.

   ![Selecting an option for recurring re-syncs](https://mintcdn.com/cdata-sync/FaXQgwCWYQjGfVUG/26.4/images/Scheduling-Jobs_scheduling-a-recurring-resync_1.png?fit=max\&auto=format\&n=FaXQgwCWYQjGfVUG\&q=85\&s=f68021230f7f4e8e3c1170ff0ca9c6bc)
2. Select options from the **Snapshot Mode**, **Period**, and **Write Mode** drop-down lists:

   * **Snapshot Mode**: Specifies how the re-sync process reads source data during the snapshot phase. You can select from these options:
     * **Incremental**: Reads snapshot rows by using the configured incremental bounds.
     * **Full**: Reads all snapshot rows without applying incremental bounds.
     * **Skip**: Skips the reading of snapshot rows.
   * **Period**: Specifies the starting point from which the re-sync process begins. You can select from these options:
     * **From Beginning**: Re-syncs the snapshot from the very beginning, ignoring any previous replication state.
     * **From Position**: Re-syncs the snapshot from a specific position that is defined by date or row number.
     * **From Now**: Re-syncs the snapshot starting from the current point in time.
   * **Write Mode**: Specifies how the re-sync process writes data to the destination. You can select from these options:
     * **DROP**: Drops the existing destination tables and re-creates them.
     * **TRUNCATE**: Truncates the existing destination tables before the re-syncing process.
     * **MERGE**: Merges the re-synced data into the existing destination tables.
3. Click **Add Schedule** to save the schedule with recurring re-sync enabled.

For details about re-sync options, see [Re-Syncing Job Task Execution](https://docs.sync.cdata.com/26.4/en/getting-started/administration/jobs-page.md#re-syncing-job-task-execution).

## Using UNIX Cron Syntax

The *cron command-line utility* is a time-based job scheduler that is used by UNIX systems. It is used to schedule jobs to run at certain times or intervals.

Cron syntax supports the following values:

| Field Name | Allowed Values | Support Special Characters |
| :- | :- | :- |
| Minutes | 0-59 | \* , - / |
| Hours | 0-23 | \* , - / |
| Days of the Month | 1-31 | \* , - ? / l w |
| Months | 1-12 or jan-dec | \* , - / |
| Days of the Week | 1-7 or sun-sat | \* , - ? / l # |

The special characters map to the following meanings:

| Character | Meaning |
| :- | :- |
| \* | Specifies all possible values for the given field. For example, if this character is specified in the **Minutes** field, the scheduler executes every minute. |
| , | Specifies multiple values in a field. |
| - | Specifies a range of values to a field. |
| / | Defines any increments for a field. For example, a value of **3/15** for the **Minute** field executes the task every fifteenth minute, starting on the third minute of the hour. |
| ? | Marks an unused field. |
| l | Specifies the last day of the field. This specification can mean the last day of the month or the last day of the week. |
| w | Specifies the nearest weekday to the specified day. For example, specifying **1w** in the **Days of the Month** field means the closest weekday to the first of the month. |
| # | Denotes the *n*th day of the month in the **Days of the Week** field. For example, **2#3** executes the task on the third Monday of the month. |

Some example cron expressions are shown below.

| Cron Expression | Meaning |
| :- | :- |
| \* \* \* \* \* | Execute every minute. |
| \*/20 \* \* \* \* | Execute every twenty minutes. |
| 0-30/5 \* \* \* \* | Execute every five minutes for the first thirty minutes of every hour. |
| 0 23 ? \* mon-fri | Execute at 11 p.m. every weeknight. |
| 2-59/3 1,9,22 11-26 1-6 \* | Execute from the 11th to the 26th of each month, from January to June, every third minute starting from two minutes past 1 a.m., 9 a.m., and 10 p.m. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.