Scheduler Trigger Types

This chapter describes the trigger types available in the Scheduler Component. By setting a trigger type you can determine the range of time during which the task takes place and when you want it repeated.

The "Interval" trigger type

This trigger type allows you to determine the repetition interval for each task. The interval can be set in Years, Months, Weeks, Days, Hours, Minutes, Seconds or Milliseconds.

For example, the task below will be repeated every day from November 15 to November 30.

The "Cron" trigger type

Compared to the "Interval" trigger type, "Cron" is more complex but also offers more flexibility. The selection of the trigger type "Cron" (from Chronos, time) provides 6 fields for the definition of a Cron expression. This determines what second, what minute, etc. a task will be started.

For the "Custom" option, the following entries are possible:

  Possible values Possible characters
Second 0-59 , - * /
Minute 0-59 , - * /
Hour 0-23 , - * /
Day (of the month) 1-31 , - * ? / L W
Month 1-12 , - * /
Weekday
(Sunday=1, Saturday=7)
1-7 , - * ? / L #

 

Legend:

Character Description
, delimiter in listings
- character for range (from to)
* wildcard 1 (=Selection ‘All‘: each value is taken)
? wildcard 2 (exactly one matching value is taken)
/ character indicating the increment
L last day
W it must be a working day (Monday - Friday)
# specifies the n-ith day of the month

Important notes:

  • The day of the month and weekday may not both be set at the same time. One of them needs a "?" for adapting to the entry in the other field.
  • Avoid time ranges in which clocks are changed (daylight)!
  • A Cron expression is composed of the entries of the 6 fields from "second" to "weekday" (separated by a space). Below are some examples:
Cron Expression Description
0 0 12 * * ? at 12:00pm (noon) every day
0 15 10 ? * * at 10:15am every day
0 * 14 * * ? Every minute starting at 2pm and ending at 2:59pm every day
0 0/5 14,18 * * ? Every 5 minutes starting at 2pm and ending at 2:55pm and every 5 minutes starting at 6pm and ending at 6:55pm, every day
0 0-5 14 * * ? Every minute starting at 2pm and ending at 2:05pm, every day
0 10,44 14 ? 3 4 at 2:10pm and at 2:44pm every Wednesday in the month of March
0 15 10 ? * 2-6 at 10:15am every Monday, Tuesday, Wednesday, Thursday and Friday
0 15 10 15 * ? at 10:15am on the 15th day of every month
0 15 10 L * ? at 10:15am on the last day of every month
0 15 10 LW * ? at 10:15am on the last working day (Mon-Fry) of every month
0 15 10 15W * ? monthly at 10:15 on the nearest working day to the 15th of the month
0 15 10 ? * 2#1 at 10:15am on the first Monday of every month
0 15 10 ? * 6#3 at 10:15am on the third Friday of every month
0 15 10 ? * 6L at 10:15am on the last Friday of every month
0 0 12 1/5 * ? at 12:00pm every 5th day of the month, beginning on the first day of the month

If you specify "1W" as the value for the day of the month, and the 1st is a Saturday, the trigger will fire on Monday the 3rd, as it will not cross over the boundary of a month's days. The "W" character can only be specified when the day of the month is a single day, not a range or list of days

Updated July 8, 2024