opyebCronPulse

iCalendar RRULE basics: FREQ, INTERVAL, COUNT and UNTIL

RRULE · 7 min read

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

PropertyMeaningExample
FREQFrequency (required)DAILY, WEEKLY, MONTHLY, YEARLY
INTERVALGap between periods (default 1)INTERVAL=2 — every other week or month
COUNTTotal number of occurrencesCOUNT=10 — ten occurrences
UNTILLast 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 CronPulse

Frequently 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