The CIC Data Flow Scheduler allows you to specify when a Data Flow runs. In addition to the several tabs that allow you to pick a schedule, the CIC Scheduler allows you to specify a schedule using cron expressions.
Cron is a standard Unix utility used to schedule commands for automatic execution at specific intervals.
Cron Expression Format
A cron expression in CIC Data Flow Scheduler is a string comprised of 7 fields separated by white space. Fields can contain any of the allowed values, along with various combinations of the allowed special characters for that field. The fields are as follows:
Field Name | Mandatory | Allowed Values | Allowed Special Characters |
---|---|---|---|
Seconds | YES | 0-59 | , - * / |
Minutes | YES | 0-59 | , - * / |
Hours | YES | 0-23 | , - * / |
Day of month | YES | 1-31 | , - * ? / L W |
Month | YES | 1-12 or JAN-DEC | , - * / |
Day of week | YES | 1-7 or SUN-SAT | , - * ? / L # |
Year | YES | 1970-2099 | , - * / |
Special Characters
Use the following characters in cron expressions as described below.
Character | Description |
---|---|
* | An asterisk indicates that the cron expression matches for all values of the field. For example, "*" in the minute field means every minute. |
? | The question mark is used to specify 'no specific value' and is allowed for the day-of-month and day-of-week fields. It is used instead of the asterisk (*) for leaving either day-of-month or day-of-week blank. |
- | Hyphens are used to define ranges. For example, "10-12" in the hour field means the hours of 10, 11, and 12. |
, | Commas are used to separate items in a list. For example, "MON,WED,FRI" in the day-of-week field means the days Monday, Wednesday, and Friday. |
/ | The forward slash is used to indicate increments. For example. "0/15" in the seconds field means the seconds 0, 15, 30, and 45. Additionally, "1/3" in the day-of-month field means every 3 days starting on the first day of the month. |
L | The "L" character is an abbreviation for "last" and is allowed for the day-of-month and day-of-week fields. It has a different meaning in each of the two fields. For example, "L" in the day-of-month field means the last day of the month. In the day-of-week field, it means 7 or SAT. However, if used in the day-of-week field after another value, it means the last xxx day of the month. For example, "6L" in the day-of-week field means the last Friday of the month. |
W | The "W" character is an abbreviation for "weekday" and is allowed for the day-of-month field. It is used to specify the weekday nearest the given day. For example, "15W" in the day-of-month field means the weekday nearest the 15th of the month. In this case, if the 15th is a Saturday, the job runs on Friday the 14th. The "L" and "W" characters can be combined in the day-of-month field. For example, "LW" means the last weekday of the month. |
# | Hash marks specify constructs. For example, "6#3' in the day-of-week field means the third Friday of the month. |
Examples
The following examples would run the CIC Scheduler as described.
Expression | Description |
---|---|
0 0 12 * * ? 2024 | Runs at 12:00 p.m. (noon) every day in 2024 |
0 15 10 ? * * * | Runs at 10:15 a.m. every day |
0 15 10 * * ? * | Runs at 10:15 a.m. every day |
0 15 10 * * ? * * | Runs at 10:15 a.m. every day |
0 15 10 * * ? 2005 | Runs at 10:15 a.m. every day during the year 2005 |
0 * 14 * * ? * | Runs every minute starting at 2:00 p.m. and ending at 2:59 p.m., every day |
0 0/5 14 * * ? * | Runs every 5 minutes starting at 2:00 p.m. and ending at 2:55 p.m., every day |
0 0/5 14,18 * * ? | Runs every 5 minutes starting at 2:00 p.m. and ending at 2:55 p.m., AND fire every 5 minutes starting at 6:00 p.m. and ending at 6:55 p.m., every day |
0 0/5 5-22 * * ? | Runs every 5 minutes between 5:00am - 10:59pm, every day |
0 0-5 14 * * ? | Runs every minute starting at 2:00 p.m. and ending at 2:05 p.m., every day |
0 10,44 14 ? 3 WED | Runs at 2:10 p.m. and at 2:44 p.m. every Wednesday in the month of March |
0 15 10 ? * MON-FRI | Runs at 10:15 a.m. every Monday, Tuesday, Wednesday, Thursday and Friday |
0 15 10 15 * ? | Runs at 10:15 a.m. on the 15th day of every month |
0 15 10 L * ? | Runs at 10:15 a.m. on the last day of every month |
0 15 10 L-2 * ? | Runs at 10:15 a.m. on the 2nd-to-last last day of every month |
0 15 10 ? * 6L | Runs at 10:15 a.m. on the last Friday of every month |
0 15 10 ? * 6L 2002-2005 | Runs at 10:15 a.m. on every last Friday of every month during the years 2002, 2003, 2004 and 2005 |
0 15 10 ? * 6#3 | Runs at 10:15 a.m. on the third Friday of every month |
0 0 12 1/5 * ? | Runs at 12:00 p.m. (noon) every 5 days every month, starting on the first day of the month |
0 11 11 11 11 ? | Runs every November 11 at 11:11 a.m. |
Comments
0 comments
Please sign in to leave a comment.