opyebCronPulse

RRULE or cron: which one belongs where

RRULE · 5 min read

One-line answer: A decision guide for server batches versus user-facing calendars, with the hybrid pattern most systems end up using.

Cron and RRULE both express repetition, but they serve different places. Choosing the wrong one makes operations harder or the user experience worse.

At a glance

AspectCronRRULE
Typical useServer batches and jobsUser calendar events
Smallest unitMinute (seconds in six-field)Day (time comes from DTSTART)
Time zoneWhatever the scheduler is set toExplicit TZID
ExceptionsApplication logicEXDATE, RECURRENCE-ID
StandardDe facto conventionRFC 5545

Server batches want cron

“Check the queue every five minutes” or “back up at 03:00” is natural in cron. Sub-hour intervals, ordering between jobs and retries belong to the scheduler and queue. Expressing a server batch as an RRULE means recomputing occurrences constantly and losing support in operational tooling.

Anything a user sees wants RRULE

“Team meeting every Monday” or “maintenance on the second Tuesday” should be an RRULE: Google Calendar, Apple Calendar and Outlook read it directly, and users can edit or delete a single occurrence. If the server expands the rule into individual events, the calendar fills with hundreds of copies that are painful to change.

# server batch (cron)
0 3 * * *  backup.sh

# user calendar (RRULE)
DTSTART;TZID=Asia/Seoul:20261207T090000
RRULE:FREQ=WEEKLY;BYDAY=MO

The hybrid pattern

Define the event as an RRULE in the calendar, then use cron to send reminders. The rule is stored once, users manage it in their calendar, and a five-minute cron looks for events starting soon and sends notifications. Each side does what it is good at.

Conversion traps

Cron's “weekdays” means Monday to Friday and knows nothing about holidays; neither does RRULE. Holiday exclusions need EXDATE or a separate holiday calendar. And cron's day/weekday OR differs from RRULE's intersection, so always expand several months of occurrences after converting.

Paste an expression and see its next run times right away.

Open CronPulse

Frequently asked questions

Can RRULE repeat every five minutes?

RRULE supports FREQ=MINUTELY, but calendar apps support it unevenly and it is a poor fit for real-time batches. Use cron or a queue scheduler for that.

Can I convert a cron expression to RRULE automatically?

Simple daily or weekly rules convert, but day/weekday OR, L, W, # and second-level rules do not map cleanly. Compare the expanded occurrence times after converting.

Sources

Related reading