Anchor Scheduling is a type of replication scheduling that ‘anchors’ the start time of extraction jobs to a time you select. This allows you to establish predictable replication and ensure that your downstream processes run as scheduled with the most up-to-date data.

In this guide, we’ll cover:


Anchor Scheduling availability

Anchor Scheduling is currently supported only for Singer-backed database and SaaS integrations.

As integrations are converted to Singer taps, this feature will be made available.


How Anchor Scheduling works

Anchor scheduling uses an Anchor Time in conjunction with a Replication Frequency to create a replication schedule.

As scheduling affects the time a replication job starts - not the time to loaded data - you should factor in time for loading the data when setting an Anchor Time. To get an idea of your integration’s average loading times, use the Loading Reports.

To use anchor scheduling, you’ll need to:

  • Select a Replication Frequency greater than an hour. One hour is the minimum frequency required to use anchor scheduling, as using an anchor time with a frequency less than an hour won’t affect an integration’s replication schedule.
  • Define an Anchor Time. An Anchor Time is the time that the Replication Frequency is “anchored” to, which Stitch will use to create a replication schedule. Selecting an Anchor Time is only required when using anchor scheduling.

When you select an Anchor Time, Stitch will use it and your selected Replication Frequency to create a replication schedule for the integration.

Initial (historical) replication jobs

After you define and save the integration, based on the selected Anchor Time, an initial replication job will kick off at the next recurrence of the Replication Frequency.

Refer to the examples in the next section for more detail.

Note: If the Anchor Time you select has already passed for the day, an initial job may not immediately begin. In this case, you can manually start a job.

Ongoing replication jobs

Ongoing replication jobs will be scheduled based on the selected Anchor Time and Replication Frequency.

If a job runs over into the next recurrence of the selected Replication Frequency, it will be skipped. Jobs will resume at the next Replication Frequency interval.

Refer to this example for more detail.


Example schedules using Anchor Scheduling

Example 1: Schedule using a 6 hour Replication Frequency

In this example, we’ll look at the potential schedule for an integration with an Anchor Time set to shortly after the current time:

  • Current date and time: May 1 @ 8:00 AM (EST), or UTC 12:00
  • Replication Frequency: 6 hours
  • Anchor Time: 9:00 AM (EST), or UTC 13:00

Based on these settings, Stitch will kick off a replication job every 6 hours starting on May 1 at 9:00 AM (EST). The schedule for this integration would look like this:

Job # Start Time (EST) Start Time (UTC)
1 May 1 09:00:00 May 1 13:00:00
2 May 1 15:00:00 May 1 19:00:00
3 May 1 21:00:00 May 2 01:00:00
4 May 2 03:00:00 May 2 07:00:00
5 May 2 09:00:00 May 2 13:00:00

Example 2: Schedule with delayed initial job

In this example, we’ll look at potential schedule for an integration with an Anchor Time that has already passed for the current day:

  • Current date and time: May 1 @ 12:00 PM (EST), or UTC 16:00
  • Replication Frequency: 24 hours
  • Anchor Time: 9:00 AM (EST), or UTC 13:00

Based on these settings, Stitch will kick off a replication job every 24 hours starting the following day (May 2) at 9:00 AM (EST). The schedule for this integration would look like this:

Job # Start Time (EST) Start Time (UTC)
1 May 2 09:00:00 May 2 13:00:00
2 May 3 09:00:00 May 3 13:00:00
3 May 4 09:00:00 May 4 13:00:00
4 May 5 09:00:00 May 5 13:00:00
5 May 6 09:00:00 May 6 13:00:00

Because the Anchor Time in thi example had already passed for the current day, the initial replication job for the integration didn’t start immediately. To start a replication job sooner, you can manually kick off a job.

Example 3: Long-running and skipped jobs

In this example, we’ll look at how a job can be skipped and re-scheduled due to a previously long-running job. This can occur when a job takes longer to run than the selected Replication Frequency.

  • Current date and time: May 1 @ 1:30 PM (EST), or UTC 17:30
  • Replication Frequency: 1 hour
  • Anchor Time: 2:30 PM (EST), or UTC 18:30

Based on these settings, Stitch will kick off a replication job every hour starting on May 1 at 2:30 PM (EST). The schedule for this integration would look like this:

Job # Start Time (EST) Start Time (UTC) End Time (EST) Duration
1 May 1 02:30:00 May 1 18:30:00 May 1 03:25:00 55 minutes
2 May 1 03:30:00 May 1 19:30:00 May 1 04:38:00 68 minutes
3 Job is skipped -
4 May 1 05:30:00 May 1 21:30:00 May 1 06:21:00 51 minutes
5 May 1 06:30:00 May 1 22:30:00 May 1 07:01:00 31 minutes

In this example, the job that would have been scheduled for May 1 04:30:00 was skipped because Job 2 took longer than the Replication Frequency (1 hour/60 minutes) to complete. Replication then resumed on the next recurrence of the Replication Frequency, which was at May 1 05:30:00.

Note: Stitch doesn’t currently send or display notifications when a job is skipped.


Create an anchored schedule for an integration

You can create an Anchored Schedule in an integration’s Settings page.

  1. To access this page, click the integration from the Stitch Dashboard and then click the Settings tab.
  2. In the Replication Frequency section, uncheck the Use integration default checkbox.
  3. Using the slider, select the Replication Frequency interval you want the schedule to use. Note: The Replication Frequency must be 1 hour or greater to use Anchor Scheduling.
  4. In the Anchor time dropdown, select the anchor time you want the schedule to use. Stitch will display a sample schedule at the bottom of the section, which will update as you change the Replication Frequency or anchor time:

  5. When finished, click the Save Integration button.


Questions? Feedback?

Did this article help? If you have questions or feedback, feel free to submit a pull request with your suggestions, open an issue on GitHub, or reach out to us.