private void UpdateRestartManager() { // Start by clearing the ScheduleManager RestartManager.Clear(); // Then loop through all server profiles and add all schedules to the ScheduleManager for (int p = 0; p < Config.Profiles.Count; p++) { for (int s = 0; s < Config.Profiles[p].Schedules.Length; s++) { RestartManager.Add( Config.Profiles[p].ID, // The ServerHostID Config.Profiles[p].Schedules[s].EventHour, // The hour at which to trigger Config.Profiles[p].Schedules[s].EventMinute, // The minute at which to trigger Config.Profiles[p].Schedules[s].Backup // Whether it's a backup event or a restart event ); } } }