Skip to content

Grain timers and reminders

Orleans schedules periodic grain work through two mechanisms with distinct ownership and durability guarantees:

MechanismOwnerSchedule storageActivation behaviorTypical cadence
Grain timerOne grain activationActivation memoryExecutes on the current activation and ends with itFrequent work while an activation is active
ReminderOne logical grainConfigured reminder providerActivates the grain when a tick is delivered and resumes after cluster recoveryWork measured in minutes, hours, or days

Choose a grain timer when the work belongs to the current activation. Choose a reminder when the schedule belongs to the grain identity and must survive activation and cluster lifecycle changes.

Grain timers execute callbacks as grain turns on one activation. The runtime schedules the next tick after the current callback completes, so a timer callback never overlaps itself.

See Grain timers for registration, callback scheduling, interleaving, activation lifetime, cancellation, and troubleshooting.

The timer behavior reference describes the guarantees controlled by GrainTimerCreationOptions.

Reminders persist a schedule for a logical grain. Reminder delivery follows normal grain request scheduling and activates the grain when needed. The provider preserves the schedule while each tick is generated and delivered by the runtime.

See Reminders for registration, durable scheduling, timing constraints, provider configuration, missed-tick reconciliation, and troubleshooting.

The reminder delivery reference explains durable definitions, volatile tick delivery, reactivation, and recovery.

The reminder timing constraints define valid due times and periods.

Every silo configures one reminder provider. See Configure reminder storage for production providers, development configuration, and provider-specific guidance.

Grains implementing IGrainBase directly use the same timer and reminder extension APIs. The dedicated grain timer and reminder pages describe the lower-level registries available through dependency injection.