Get started with a free trial today
Already have an account? Sign in
Advanced Scheduling is an upgraded feature
Cron scheduling allows you to fine-tune an integration’s replication schedule, ensuring you have the data you need when you need it.Contact Stitch Sales for more info.
For more info about Stitch Advanced, contact theStitch Sales team.
The Advanced Scheduler feature allows you to specify granular start times for data extraction. Using cron expressions, you can specify the exact times, days of the week, or even days of the month data extraction should begin.
Note: All replication scheduling methods (Replication Frequency, Anchor Scheduling, and Advanced Scheduling) define when data extractions begin. They do not control how long a replication job runs or when data is loaded into a destination.
In this guide, we’ll cover:
Using Advanced Scheduling, you can:
Run reports on specified days. Using Advanced Scheduling, you can create a replication schedule that ensures reports for a weekly 9:00AM meeting are up-to-date.
Whitelist hours for starting data extractions. For example: Scheduling replication during off-peak hours will reduce load on your production database.
Note: An extraction may run over into “blackout” hours as the Advanced Scheduler only controls the times jobsstart.See the Limitations section for more info.
Reduce your row usage. Only scheduling data extractions when you need them can not only reduce load on data sources and your destination, it can reduce your overall row usage in Stitch.
Reduce the re-replication of data. Because replication scheduling applies to all selected tables in an integration, tables usingFull Table Replication will replicate in full each time a replication job runs. Reducing the number of replication jobs overall will decrease the number of times the same record is replicated.
Advanced Scheduling is available during the Free Trial or on an Advanced or Premium plan. ContactStitch Sales for more info about these plans.
When the Free Trial ends or if you downgrade from an Advanced or Premium plan, you’ll lose access to the Advanced Scheduling feature.
In the event that you downgrade, Stitch will automatically pause any integrations using Advanced Scheduling and reset theirReplication Frequencies to their defaults. You will need to manually un-pause the integrations to continue replication.
Stitch’s Advanced Scheduler feature uses cron scheduling to create replication schedules. In this section, we’ll:
So, what’s cron?Cron is a time-based scheduler used in Unix-like operating systems such as Mac OS, Linux, etc. Tasks, or jobs, created through cron are calledcron jobs. Stitch uses theQuartz standard for cron scheduling.
To create a cron job - in this case, an integration’s replication schedule - acron expression is used. A cron expression describes the details of the schedule, and when combined, translates to the schedule Stitch will use to extract data from the integration.
Using a cron expression, you can create replication schedules such as“At 12:00AM every day” or“At 7:00PM every Monday, Wednesday, and Friday”. Stitch will then start replication jobs at these times.
A cron expression in Stitch is made up of six fields that describe the elements of the schedule, separated by spaces.
Fields in the expression must be in the following order, and an expression must have all six fields to be considered valid:
[seconds] [minute] [hour] [dayofmonth] [month] [dayofweek]Note: The expression uses UTC time. The time zone cannot be customized, but the corresonding local time is displayed in theSample schedule (local time) when creating the expression.
Fields can contain any of the allowed values, along with various combinations of the allowed special characters for that field.Note: Entering anything other than a field’s allowed values or special characters will result in an error when you try to save the integration’s settings. Refer to theTroubleshooting section for help resolving these errors.
| Name | Allowed values | Allowed special characters |
| Seconds | 0 | n/a |
| Minutes | 0-59 | , - * / |
| Hours | 0-23 | , - * / |
| Day of month | 1-31 | , - * ? / L W |
| Month | 1-12 or JAN-DEC | , - * / |
| Day of week | 1-7 or SUN-SAT | , - * ? / L # |
Each field in a cron expression has its own list of allowed special characters. These characters allow you to select all values, a list or range of values, specify increments, and more. Fields may also contain both a range and a list. Refer to theExample replication schedules section for examples.
| Special character | Allowed in | Description and examples |
*ASTERISK | All fields | Selects all values within a field. Examples:
|
,COMMA | All fields | Specifies a list of two or more values. Examples:
|
-HYPHEN | All fields | Specifies a range of values. Examples:
|
?QUESTION MARK | Day of month, Day of week | Indicates“no specific value”. This character is useful when you need to specify something in either theDay of month orDay of week field, but not the other. Note: Quartz doesn’t currently support specifying a value for both theDay of week andDay of month fields. This value must be present in one of these fields for the expression to be valid. Examples:
|
/SLASH | All fields | Specifies increments. Formatted as:
|
LLAST | Day of month, Day of week | Depending on the field
To avoid confusing or unexpected results, don’t specify lists or ranges of values with
|
WWEEKDAY | Day of month | Specifies the weekday (Monday - Friday) closest to the given day.Note: This character is only allowed when theDay of month value is a single day, not a range or list of days.
|
#HASH | Day of week | Specifies the Note: If
|
Based on scheduling feedback we’ve collected, we’ve put together a list of some of the most commonly requested replication schedules. You can use these examples to define an integration’s replication schedule in Stitch, or create your own. Keep in mind that there are somelimitations.
| Seconds | Minutes | Hours | Day-of-month | Month | Day-of-week |
| 0 | 0 | 0 | ? | * | * |
| 0 | 0 | 0 | * | * | ? |
| Seconds | Minutes | Hours | Day-of-month | Month | Day-of-week |
| 0 | 0 | 0 | ? | * | 2-6 |
| 0 | 0 | 0 | ? | * | MON-FRI |
| Seconds | Minutes | Hours | Day-of-month | Month | Day-of-week |
| 0 | 0 | 23 | ? | * | 1 |
| 0 | 0 | 23 | ? | * | SUN |
| Seconds | Minutes | Hours | Day-of-month | Month | Day-of-week |
| 0 | 0 | 0,12 | * | * | ? |
| 0 | 0 | 0,12 | ? | * | * |
| Seconds | Minutes | Hours | Day-of-month | Month | Day-of-week |
| 0 | 0 | 3 | ? | * | 3-5 |
| 0 | 0 | 3 | ? | * | TUE-THUR |
| Seconds | Minutes | Hours | Day-of-month | Month | Day-of-week |
| 0 | 0 | 0 | ? | * | 2,4,6 |
| 0 | 0 | 0 | ? | * | MON,WED,FRI |
| Seconds | Minutes | Hours | Day-of-month | Month | Day-of-week |
| 0 | 5-10,30 | * | ? | 1 | * |
| 0 | 5-10,30 | * | * | 1 | ? |
While using cron expressions will give you the most control over your integrations’ replication schedules, there are some limitations to keep in mind:
You can specify a Day of week OR Day of month value, but not both. Quartz, the cron implementation used by Stitch,doesn’t currently support specifying values for both fields in an expression. One of these fields must contain the? character for the expression to be considered valid.
Advanced Scheduling can only be used to whitelist extraction start times. This means that a job could start during a whitelisted time period but continue running beyond that window, depending on the duration of the extraction.
For example: An integration has a schedule that tells it to run every 20 minutes between the hours of noon and 2:00PM, starting at noon.
On average, extractions for this integration take between 2-5 minutes. However, the extraction that starts at 1:40PM takes longer than average, causing the job to continue running even after the 2:00PM mark. As a result, the job scheduled for 2:00PM will be skipped and resume at the next scheduled interval.
You can create an Advanced Schedule in an integration’sSettings page.
In theReplication Frequency section, check theAdvanced box located under theAnchor time menu. This will open theAdvanced Scheduler.
Note: This feature is only availableduring the Free Trial or on an Advanced or Premium plan.
Enter the values you want into each of the fields. Stitch will validate the schedule after each change. If the schedule is valid, a sample schedule will display under the fields.
Quartz Scheduler - The official documentation for the Quartz Scheduler.
Quartz Cron Trigger Tutorial - A cron tutorial from the makers of Quartz, the cron implementation used in Stitch.
Quartz Cron Expression Generator - A simple, web-based editor for Quartz cron expressions.
| Related | Troubleshooting |
Did this article help? If you have questions or feedback, feel free tosubmit a pull request with your suggestions,open an issue on GitHub, orreach out to us.