# GrainReminderExtensions.RegisterOrUpdateReminder(Grain, string, TimeSpan, TimeSpan, CancellationToken)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.reminders/orleans.grainreminderextensions/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.reminders/orleans.grainreminderextensions/methods/)

[Source](https://github.com/dotnet/orleans/blob/1644940b035c7bdf215a4fd7135757c06bcfe9ec/src/Orleans.Reminders/GrainReminderExtensions.cs)

```csharp
public static Task<IGrainReminder> RegisterOrUpdateReminder(this Grain grain, string reminderName, TimeSpan dueTime, TimeSpan period, CancellationToken cancellationToken)
```

Registers or updates a reminder.

### Parameters

- `grain` (`Grain`): The grain instance.
- `reminderName` (`string`): The reminder name.
- `dueTime` (`TimeSpan`): The due time.
- `period` (`TimeSpan`): The period.
- `cancellationToken` (`CancellationToken`): The cancellation token.

### Returns

The reminder.
