Recurring Events in .NET MAUI Scheduler—An Overview
Tags: maui, mobile, scheduler, productivity
Published: 2023-01-25 11:40:13

---
title: Recurring Events in .NET MAUI Scheduler—An Overview
published: true
date: 2023-01-25 10:04:13 UTC
tags: maui, mobile, scheduler, productivity
canonical_url: https://www.syncfusion.com/blogs/post/recurring-events-in-net-maui-scheduler-an-overview.aspx
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/htaev5d6zosws2zukw6v.png
---
The [.NET MAUI Scheduler](https://www.syncfusion.com/maui-controls/maui-scheduler "Syncfusion .NET MAUI Scheduler") is a tool for scheduling events in a .NET MAUI application. It supports scheduling recurring events, which are regularly or periodically occurring appointments or events. Scheduler’s API has been designed with simplicity and ease of use in mind, so that anyone can add recurring events to their project with just a few API calls. Supported by a robust internal scheduling engine, Scheduler gives you all the APIs you need to build simple and easy-to-maintain schedules.

Let’s see how to create and customize recurrence appointments in the .NET MAUI Scheduler.

**Note:** If you are new to this control, refer to the [.NET MAUI Scheduler getting started](https://help.syncfusion.com/maui/scheduler/getting-started "Getting Started with Syncfusion .NET MAUI Scheduler") documentation before proceeding.

## Recurrence Rule

The Scheduler control uses the recurrence rule (string) to specify the recurrence details of an appointment. The recurrence rule specifies the recurrence frequency, interval, range, and position details.

### Recurrence pattern

The pattern specifies the frequency or type of appointment: daily, weekly, monthly, and yearly.

### Interval

Specify the interval between consecutive occurrences of the recurring appointment.

### Range

The time range in which an appointment recurs. The range value is determined by the recurrence rule’s number of instances (count) or the end date (until). The recurring appointment is considered a never-ending appointment when the range is not specified.

### Position details

The position (the day of the week, week of the month, month of the year) is specified and used on weekly, monthly, and yearly recurrence types.

## Recurrence Types

Recurrence is the base term describing a repeating pattern. Business people use the concept of regular assignment of tasks or recurring events on certain days of the week, month, or even annually, like Jan. 1 every year.

### Daily recurrence type

An appointment repeats daily with a specified day interval within a set date range. Following are some examples of daily recurrences.

<table style="border-collapse: collapse; width: 100%; height: 161px;">
<tbody>
<tr style="height: 23px;">
<td style="width: 58.3222%; height: 23px;"><strong>Rule</strong></td>
<td style="width: 41.6778%; height: 23px;"><strong>Description</strong></td>
</tr>
<tr style="height: 46px;">
<td style="width: 58.3222%; height: 46px;">FREQ=DAILY;INTERVAL=1;COUNT=5</td>
<td style="width: 41.6778%; height: 46px;">Repeats the appointment for 5 consecutive days.</td>
</tr>
<tr style="height: 46px;">
<td style="width: 58.3222%; height: 46px;">FREQ=DAILY;INTERVAL=1;UNTIL=20221225</td>
<td style="width: 41.6778%; height: 46px;">Repeats the appointment every day until the specified end date.</td>
</tr>
<tr style="height: 46px;">
<td style="width: 58.3222%; height: 46px;">FREQ=DAILY;INTERVAL=2</td>
<td style="width: 41.6778%; height: 46px;">Repeats the appointment every 2 days with no end date.</td>
</tr>
</tbody>
</table>

### Weekly recurrence type

An appointment repeats on a specified weekday with a specified week interval within the specified date range. Following are some examples of weekly recurrences.

<table style="border-collapse: collapse; width: 101.836%;">
<tbody>
<tr>
<td style="width: 37.0392%;"><strong>Rule</strong></td>
<td style="width: 62.9608%;"><strong>Description</strong></td>
</tr>
<tr>
<td style="width: 37.0392%;">FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,WE;COUNT=5</td>
<td style="width: 62.9608%;">Repeats the appointment 5 times for specified weekdays (Monday, Wednesday) of every week.</td>
</tr>
<tr>
<td style="width: 37.0392%;">FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,WE;UNTIL=20221225</td>
<td style="width: 62.9608%;">Repeats the appointment on specified weekdays (Monday, Wednesday) of every week until the specified end date.</td>
</tr>
<tr>
<td style="width: 37.0392%;">FREQ=WEEKLY;INTERVAL=2;BYDAY=MO,WE</td>
<td style="width: 62.9608%;">Repeats the appointment on specified weekdays (Monday, Wednesday) every 2 weeks with no end date.</td>
</tr>
</tbody>
</table>

### Monthly recurrence type

An appointment repeats on a specified day of the month or weekday of a specified week position with a specified month interval within a set date range. Following are some examples of monthly recurrences.

<table style="border-collapse: collapse; width: 100%;">
<tbody>
<tr>
<td style="width: 38.6258%;"><strong>Rule</strong></td>
<td style="width: 61.3742%;"><strong>Description</strong></td>
</tr>
<tr>
<td style="width: 38.6258%;">FREQ=MONTHLY;BYMONTHDAY=3;INTERVAL=1;COUNT=5</td>
<td style="width: 61.3742%;">Repeats the appointment 5 times on a specified day (3<sup>rd</sup>) of every month.</td>
</tr>
<tr>
<td style="width: 38.6258%;">FREQ=MONTHLY;INTERVAL=1;BYDAY=MO;BYSETPOS=2;UNTIL=20221225</td>
<td style="width: 61.3742%;">Repeats the appointment on a specified weekday (Monday) of a specified week (week 2) of every month until the specified end date.</td>
</tr>
<tr>
<td style="width: 38.6258%;">FREQ=MONTHLY;INTERVAL=2;BYDAY=MO;BYSETPOS=2</td>
<td style="width: 61.3742%;">Repeats the appointment on a specified weekday (Monday) of a specified week (week 2) every 2 months with no end date.</td>
</tr>
</tbody>
</table>

### Yearly recurrence type

Schedule and repeat an appointment on a specified day of a month or weekday of specified week position of a month with a specified year interval within a specified date range.

<table style="border-collapse: collapse; width: 100%;">
<tbody>
<tr>
<td style="width: 53.6204%;"><strong>Rule</strong></td>
<td style="width: 46.3796%;"><strong>Description</strong></td>
</tr>
<tr>
<td style="width: 53.6204%;">FREQ=YEARLY;BYMONTHDAY=16;BYMONTH=6;INTERVAL=1;COUNT=5</td>
<td style="width: 46.3796%;">Repeats the appointment 5 times for a specified day (16th) in the same month (June) of every year.</td>
</tr>
<tr>
<td style="width: 53.6204%;">FREQ=YEARLY;BYDAY=SU;BYSETPOS=3;BYMONTH=8;INTERVAL=1;UNTIL=20251225</td>
<td style="width: 46.3796%;">Repeats the appointment on a specified weekday (Sunday) of a specified week (week 3) in a specified month (August) for every year until the specified end date.</td>
</tr>
<tr>
<td style="width: 53.6204%;">FREQ=YEARLY;BYDAY=SU;BYSETPOS=3;BYMONTH=8;INTERVAL=2;</td>
<td style="width: 46.3796%;">Repeats the appointment on a specified weekday (Sunday) of a specified week (week 3) in a specified month (August) every two years with no end date.</td>
</tr>
</tbody>
</table>

**Example**

```csharp
SfScheduler scheduler = new SfScheduler();
scheduler.View = SchedulerView.Week;
var appointment = new ObservableCollection<SchedulerAppointment>();

//Adding scheduler appointment in the scheduler appointment collection.
appointment.Add(new SchedulerAppointment()
{
    StartTime = DateTime.Today.Date.AddHours(9),
    EndTime = DateTime.Today.Date.AddHours(11),
    Subject = "Daily scrum meeting",
    RecurrenceRule = "FREQ=DAILY;INTERVAL=1;COUNT=10"
});

//Adding the scheduler appointment collection to the AppointmentsSource of .NET MAUI Scheduler.
scheduler.AppointmentsSource = appointment;
this.Content = scheduler;
```
<figure>

  <img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/01/Daily-Recurrence-Type-in-.NET-MAUI-Scheduler-1.png" alt="Daily Recurrence Type in .NET MAUI Scheduler" style="width:100%">

  <figcaption>Daily Recurrence Type in .NET MAUI Scheduler</figcaption>

</figure>

**Note:** For more details, refer to the [Recurrence appointments in the .NET MAUI Scheduler documentation](https://help.syncfusion.com/maui/scheduler/appointments#recurrence-appointment "Recurrence appointments in the .NET MAUI Scheduler").

## Recurrence Exception Appointment

The Scheduler control provides support to restrict (change start time, end time, and appointment details) occurrences and remove an occurrence of a repeating appointment with a recurrence exception.

### Deleting a recurring appointment

The **RecurrenceExceptionDates** property in an appointment is used to remove the occurrence on specified dates.

Refer to the following code example.

```csharp
SfScheduler scheduler = new SfScheduler();
scheduler.View = SchedulerView.Week;
var appointment = new ObservableCollection<SchedulerAppointment>();

//Adding scheduler appointment in the scheduler appointment collection.
appointment.Add(new SchedulerAppointment()
{
    StartTime = DateTime.Today.Date.AddHours(9),
    EndTime = DateTime.Today.Date.AddHours(11),
    Subject = "Daily scrum meeting",
    RecurrenceRule = "FREQ=DAILY;INTERVAL=1;COUNT=10",
    RecurrenceExceptionDates = new ObservableCollection<DateTime> { DateTime.Today.AddDays(1) },
});

//Adding the scheduler appointment collection to the AppointmentsSource of .NET MAUI Scheduler.
scheduler.AppointmentsSource = appointment;
this.Content = scheduler;
```
<figure>

  <img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/01/Deleting-an-occurrence-of-a-recurring-appointment-1.png" alt="Deleting an occurrence of a recurring appointment" style="width:100%">

  <figcaption>Deleting an occurrence of a recurring appointment</figcaption>

</figure>

### Modifying an occurrence of an appointment

The **RecurrenceExceptionDates** and **RecurrenceId** properties in an appointment are used to change the occurrence appointment details without removing the appointment on a specified date.

Refer to the following code example.

```csharp
SfScheduler scheduler = new SfScheduler();
scheduler.View = SchedulerView.Week;
var appointment = new ObservableCollection<SchedulerAppointment>();

//Adding scheduler appointment in the scheduler appointment collection.
appointment.Add(new SchedulerAppointment()
{
     Id = 1,
     StartTime = DateTime.Today.Date.AddHours(9),
     EndTime = DateTime.Today.Date.AddHours(11),
     Subject = "Daily scrum meeting",
     RecurrenceRule = "FREQ=DAILY;INTERVAL=1;COUNT=10",
     RecurrenceExceptionDates = new ObservableCollection<DateTime> { DateTime.Today.AddDays(1) },
});

//Adding exception appointment in the scheduler appointment collection.
Appointment.Add(new SchedulerAppointment()
{
     Id = 2,
     StartTime = DateTime.Today.AddDays(1).Date.AddHours(11),
     EndTime = DateTime.Today.AddDays(1).Date.AddHours(13),
     Subject = "Scrum meeting - Changed",
     RecurrenceId=1,
});

//Adding the scheduler appointment collection to the AppointmentsSource of .NET MAUI Scheduler.
scheduler.AppointmentsSource = appointment;
this.Content = scheduler;
```
<figure>

  <img src="https://www.syncfusion.com/blogs/wp-content/uploads/2023/01/Modified-an-occurrence-of-a-recurring-appointment-on-a-Scheduler-1.png" alt="Modified an occurrence of a recurring appointment on a Scheduler" style="width:100%">

  <figcaption>Modified an occurrence of a recurring appointment on a Scheduler</figcaption>

</figure>

## Conclusion

Thank you for your time! This blog post showed how to set a recurring appointment in the [.NET MAUI Scheduler](https://www.syncfusion.com/maui-controls/maui-scheduler ".NET MAUI Scheduler"). You can explore other features in the Scheduler control in the [documentation](https://help.syncfusion.com/maui/scheduler/overview "Overview of .NET MAUI Scheduler"), where you can find detailed explanations of each with code examples.

If you are not a Syncfusion customer, you can try our 30-day [free trial](https://www.syncfusion.com/downloads "Free evaluation of the Syncfusion Essential Studio") to see how our components can enhance your projects.

Please feel free to try out the samples available in our [.NET MAUI sample location](https://github.com/syncfusion/maui-demos "Syncfusion .NET MAUI GitHub demos") and share your feedback or ask questions in the comments section. Or contact us through our [support forum](https://www.syncfusion.com/forums "Syncfusion Support Forum"), [support portal](https://support.syncfusion.com/ "Syncfusion Support Portal"), or [feedback portal](https://www.syncfusion.com/feedback/home "Syncfusion Feedback Portal"). We are happy to assist you!

## Related blogs

- [How to Draw 2D Graphics in .NET MAUI’s GraphicsView](https://www.syncfusion.com/blogs/post/draw-2d-graphics-in-dotnet-maui-graphicsview.aspx "Blog: How to Draw 2D Graphics in .NET MAUI’s GraphicsView")
- [Keyboard Shortcuts in .NET MAUI Scheduler](https://www.syncfusion.com/blogs/post/keyboard-shortcuts-in-dotnet-maui-scheduler.aspx "Blog: Keyboard Shortcuts in .NET MAUI Scheduler")
- [4 Impressive Features of .NET MAUI in .NET 7](https://www.syncfusion.com/blogs/post/4-impressive-features-of-net-maui-in-net-7.aspx "Blog: 4 Impressive Features of .NET MAUI in .NET 7")
- [Syncfusion Mobile and Desktop Controls Are Now Compatible with .NET 7](https://www.syncfusion.com/blogs/post/syncfusion-mobile-and-desktop-controls-are-now-compatible-with-net-7.aspx "Blog: Syncfusion Mobile and Desktop Controls Are Now Compatible with .NET 7")