The Java EE 6 Tutorial, Volume I

Specifying Intervals

The forward slash (/) constrains an attribute to a starting point and an interval. It is used to specify every N seconds, minutes, or hours within the minute, hour or day. For an expression of the form x/y, x represents the starting point and y represents the interval. The wildcard character may be used in the x position of an interval, and is equivalent to setting x to 0.

Intervals may only be set for second, minute, and hour attributes.


Example 16–12 Calendar Expressions Using Intervals

The following expression represents every 10 minutes within the hour:

minute="*/10"

It is equivalent to:

minute="0,10,20,30,40,50"

The following expression represents every two hours starting at noon:

hour="12/2"