Notification Services—Creating a Vacuum Schedule
Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio
Creating a Vacuum Schedule
A vacuum schedule named StockWatchVacuumSchedule is created in the
CreateVacuumSchedule( ) method of Example 18-1. The code follows:
private static void CreateVacuumSchedule( ) { VacuumSchedule vs = new VacuumSchedule (a, "StockWatchVacuumSchedule"); vs.StartTime = new TimeSpan(0, 0, 0); a.VacuumSchedules.Add(vs); Console.WriteLine("Added vacuum schedule: " + vs.Name); }
Vacuuming removes old event and notification data from the application database
on a daily schedule. The StartTime property specifies the daily time in Universal
Coordinated Time (UTC) for the data removal process to start. Although specifying
a vacuum schedule is optional, old data is not removed from the database if a vacuum
schedule is not specified.
The NMO classes for managing vacuum schedules are described in Table 18-12.
Table 18-12. NMO classes for managing vacuum schedules
| Class | Description |
VacuumSchedule
| Represents a data removal schedule. |
VacuumScheduleCollection
| Represents a collection of data removal schedules as VacuumSchedule objects. The
|
|

