Cron schedules for HTTP Sync Sets allow the user to specify a sync frequency with greater flexibility. For example, it can be as simple as ‘Sync at 8AM every day’, or as complex as ‘Sync every 5 minutes starting at 1PM and ending at 1:35PM, AND sync every 5 minutes starting at 8PM and 8:45PM, every day’. For our purposes, the following type of schedule is especially useful for limiting the sync of datasets or folders with large overhead that consume a lot of bandwidth, but change infrequently, such as ‘Sync at 8AM on the last day of every month’.
|Seconds||Minutes||Hours||Day of Month||Month||Day of Week||Year|
|0-59||0-59||0-23||1-31||1-12 or Jan-DEC||1-7 or SUN-SAT||empty, 1970-2099|
All of these fields are mandatory except for the year field which can be left out entirely. For the full list including special characters, visit the Quartz CronTrigger Tutorial.
Examples from Quartz
|0 0 12 * * ?||Fire at 12pm (noon) every day|
|0 15 10 ? * *||Fire at 10:15am every day|
|0 * 14 * * ?||Fire every minute starting at 2pm and ending at 2:59pm, every day|
|0 0/5 14,18 * * ?||Fire every 5 minutes starting at 2pm and ending at 2:55pm, AND fire every 5 minutes starting at 6pm and ending at 6:55pm, every day|
|0 0-5 14 * * ?||Fire every minute starting at 2pm and ending at 2:05pm, every day|
|0 10,44 14 ? 3 WED||Fire at 2:10pm and at 2:44pm every Wednesday in the month of March|
|0 15 10 ? * MON-FRI||Fire at 10:15am every Monday, Tuesday, Wednesday, Thursday and Friday|
|0 15 10 15 * ?||Fire at 10:15am on the 15th day of every month|
|0 15 10 L * ?||Fire at 10:15am on the last day of every month|
|0 15 10 ? * 6L||Fire at 10:15am on the last Friday of every month|
|0 11 11 11 11 ?||Fire every November 11th at 11:11am|
Pay attention to the effects of ‘?’ and ‘*’ in the day-of-week and day-of-month fields. There is more than one way to formulate many of these expressions to achieve the same result. Test your expression to make sure it has the effect you intend.
For more information or help in determining the correct expression, you can also contact TC Technology Support.