iCalendar RRULE basics: FREQ, INTERVAL, COUNT and UNTIL
One-line answer: The four core properties of an RFC 5545 recurrence rule, how they relate to DTSTART, and worked examples.
An iCalendar RRULE defines how a calendar event repeats. Google Calendar, Apple Calendar, Outlook and CalDAV all use the same specification, RFC 5545. Where cron is “a rule the server checks every minute”, an RRULE is “a rule that expands into calendar occurrences”.
The four core properties
| Property | Meaning | Example |
|---|---|---|
FREQ | Frequency (required) | DAILY, WEEKLY, MONTHLY, YEARLY |
INTERVAL | Gap between periods (default 1) | INTERVAL=2 — every other week or month |
COUNT | Total number of occurrences | COUNT=10 — ten occurrences |
UNTIL | Last occurrence (inclusive) | UNTIL=20261231T235959Z |
The simplest rule is FREQ=DAILY. With DTSTART on 1 December 2026 at 09:00 it occurs at 09:00 every day. FREQ=WEEKLY;INTERVAL=2 repeats every second week counted from DTSTART's week, and FREQ=MONTHLY;COUNT=6 produces six monthly occurrences.
DTSTART is the first occurrence
An RRULE is interpreted together with DTSTART, and DTSTART itself is the first occurrence. COUNT includes it. If DTSTART is 1 December and the rule is FREQ=WEEKLY;COUNT=3, the occurrences are 1, 8 and 15 December. Treating DTSTART as a mere anchor and excluding it from COUNT shifts everything by one period.
COUNT and UNTIL are mutually exclusive
RFC 5545 forbids setting both. If both seem necessary, pick one and cut the series where it should end. When DTSTART has a time zone, write UNTIL in UTC with a trailing Z. A local UNTIL can slip a day around a DST transition.
Common rules
daily FREQ=DAILY
weekdays FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
every other Monday FREQ=WEEKLY;INTERVAL=2;BYDAY=MO
1st of the month FREQ=MONTHLY;BYMONTHDAY=1
last day FREQ=MONTHLY;BYMONTHDAY=-1
1 January FREQ=YEARLY;BYMONTH=1;BYMONTHDAY=1
BYMONTHDAY=-1 means the last day of the month, whether February has 28 or 29 days. It is the RRULE equivalent of cron's L.
Reading order
In practice: choose FREQ for the base period, INTERVAL for the gap, BYDAY and BYMONTHDAY to narrow the dates, then COUNT or UNTIL to stop. Read in that order and even complex rules stay manageable. CronPulse's builder follows the same order and shows the next occurrences immediately.
Paste an expression and see its next run times right away.
Open CronPulseFrequently asked questions
Can FREQ be omitted from an RRULE?
No. FREQ is required; without it the rule is invalid. INTERVAL, COUNT, UNTIL, BYDAY and the other BY-parts are optional.
What happens if both COUNT and UNTIL are present?
RFC 5545 does not allow both. Some implementations stop at whichever comes first, but for interoperability use only one.
Sources
Related reading
- Cron in five fields: minute, hour, day, month, weekdayWhat each of the five Unix cron fields means, which values are allowed, and how to read an expression without guessing.
- Cron special characters: *, /, -, commas, ?, L, W and #The eight symbols that make cron expressive, what each one means, and where implementations disagree.
- Five-field Unix cron versus six-field Quartz and EventBridgeSeconds, weekday numbers, the ? rule and the year field: what changes when you move a schedule between cron dialects.
- Daylight saving and cron: the day 02:30 disappearsHow clock changes affect cron runs, and how to move jobs out of the 2–3 AM danger window.