Open-Source Wikis

/

Cal.com

/

Primitives

/

Schedule

calcom/cal.com

Schedule

A recurring availability template (e.g., "Mon–Fri 9–5", "Weekend coaching: Sat 10–2"). Defined by the Schedule model and a related Availability model.

Schema highlights

Schedule:

  • id, userIdUser
  • name, timeZone
  • availability (relation, many Availability rows)
  • eventType (relation — event types referencing this as default)
  • selectedCalendarId (optional)
  • dateOverrides (relation — Availability rows with explicit date)

Availability:

  • id, userId, eventTypeId?, scheduleId?, days (int[]), date? (date override), startTime, endTime

Where it lives in code

Concern File
Domain packages/features/schedules
Editor UI apps/web/modules/availability/, packages/features/schedules/components/
Slot consumption packages/features/slots, packages/lib/availability.ts
Out-of-bounds + interval limits packages/lib/isOutOfBounds.tsx, packages/lib/intervalLimits/, packages/lib/intervalTree.ts
Travel schedule overlay packages/features/travelSchedule
Holidays import packages/features/holidays
OOO overlay packages/features/ooo

Important behaviors

  • Default schedule — a user has a defaultScheduleId and event types inherit it unless overridden.
  • Date overrides — entries with an explicit date override the recurring pattern for that day.
  • Travel schedule — temporary timezone shift for traveling organizers.
  • Holidays + OOO — additional layers that can block availability without modifying the underlying schedule.

How a slot is generated

See features/scheduling for the full diagram. In short:

  1. Load schedule + availability rows.
  2. Subtract date overrides.
  3. Subtract OOO + holidays.
  4. Subtract busy times from federated calendars.
  5. Subtract reserved slots (SelectedSlot locks).
  6. Apply event-type period rules (isOutOfBounds).
  7. Slice into candidate slots at the event-type's length granularity.

Consumers

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Schedule – Cal.com wiki | Factory