Scheduling with Quartz cron expressions
This page provides an in-depth look at the scheduling features for Data Loader batch pipelines. These scheduling features are driven by Quartz cron expressions, which follow a specific syntax.
You can create a schedule when setting the frequency for the pipeline either in "Basic" or "Advanced" mode.
Scheduling a pipeline offers two distinct modes:
Basic mode
Basic mode enables you to configure your schedule without the need to write a Quartz cron expression explicitly. In Basic mode, you can choose the time of the schedule, set the schedule to run every X days, or specify specific days of the week. Data Loader will convert your selections into a Quartz cron expression.
Advanced mode
Advanced mode lets you write Quartz cron expressions to schedule your pipelines. Using a cron expression lets you fine-tune a schedule to your specific needs. A Quartz cron expression consists of six space-separated fields:
<second> <minute> <hour> <day of the month> <month> <day of the week>
There is a minimum interval of five minutes between scheduled runs to ensure smooth system performance.
Note
The Quartz cron expression mechanism does not support expressions containing lists of seconds or minutes.
Field descriptions
Property | Description | Example |
---|---|---|
Second | Specifies seconds within a minute (0-59). Special characters like * , - , and / can be used. |
*/10 represents every 10 seconds. |
Minute | Defines minutes within an hour (0-59). Special characters like * , - , and / can be used. |
5/10 means every 10 minutes starting at the 5th minute. |
Hour | Indicates hours within a day (0-23). Special characters like * , - , and / can be used. |
8-10 includes 8:00am, 9:00am, and 10:00am. 6,18 denotes 6:00am and 6:00pm. |
Day of the Month | Specifies days within a month (1-31). Special characters like * , - , ? , / and L can be used. |
1-4 covers the first four days of the month. L stands for the last day of the month. |
Month | Represents months of the year (1-12 or JAN-DEC). Special characters like * , - , and / can be used. |
12 corresponds to December. |
Day of the Week | Represents days of the week (1-7 or SUN-SAT). Special characters like * , - , ? , / L and # can be used. |
2-6 covers every weekday (Monday to Friday). |
Special characters
Quartz cron expressions use special characters to define schedules.
Property | Description |
---|---|
* |
Represents all values within a field. For example, * in the minute field corresponds to every minute. |
? |
Specifies something in one field but not the other (commonly used for days of the week). |
- |
Specifies ranges. For example, 10-12 in the hour field means the hours 10, 11, and 12. |
, |
Defines additional values. For instance, MON,WED,FRI in the day-of-week field represents Monday, Wednesday, and Friday. |
/ |
Indicates increments. For example, 0/15 in the seconds field means the seconds 0, 15, 30, and 45. |
L |
It has different meanings based on its field. In the day-of-month field, it signifies the last day of the month. In the day-of-week field, it means "7" or "SAT" when used by itself. |
# |
Indicates "the nth" day of the week in a month. For instance, 6#3 in the day-of-week field means the third Friday of the month. |
Example expressions
Here is a sample of Quartz cron expressions:
Run every weekday (Monday to Friday) at 3:30pm:
0 30 15 ? * MON-FRI *
Run on the first day of the month at 6:00am
0 0 6 1 * ? *
Run every 15 minutes between 9:00am and 5:00pm on weekdays
0 0/15 9-17 ? * MON-FRI
Run at the start of every hour, every day
0 0 * ? * * *
Warning
Quartz cron expressions support a value in either the 4th or the 6th position but not both. Additionally, both positions cannot be empty. If you create an invalid cron pattern, your system may become unresponsive.