RRULE or cron: which one belongs where
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
| Aspect | Cron | RRULE |
|---|---|---|
| Typical use | Server batches and jobs | User calendar events |
| Smallest unit | Minute (seconds in six-field) | Day (time comes from DTSTART) |
| Time zone | Whatever the scheduler is set to | Explicit TZID |
| Exceptions | Application logic | EXDATE, RECURRENCE-ID |
| Standard | De facto convention | RFC 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 CronPulseFrequently 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
- 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.