# IReminderService.RegisterOrUpdateReminder(GrainId, string, TimeSpan, TimeSpan, CancellationToken)

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

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

```csharp
[Orleans.Alias(1281C86D)]
public virtual Task<IGrainReminder> RegisterOrUpdateReminder(GrainId grainId, string reminderName, TimeSpan dueTime, TimeSpan period, CancellationToken cancellationToken)
```

Registers a new reminder or updates an existing one.

### Parameters

- `grainId` (`GrainId`): A reference to the grain which the reminder is being registered or updated on behalf of.
- `reminderName` (`string`): The reminder name.
- `dueTime` (`TimeSpan`): The amount of time to delay before firing the reminder initially.
- `period` (`TimeSpan`): The time interval between invocations of the reminder.
- `cancellationToken` (`CancellationToken`): The cancellation token.

### Returns

The reminder.
