Changeset 435


Ignore:
Timestamp:
10/2/2008 2:32:44 AM (6 years ago)
Author:
lowjoel
Message:

-Set the DaysOfWeek? enumeration to use the values in the DayOfWeek? enumeration, so that corresponding values can be computed from the other.
-Implemented Monthly scheduling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/Manager/Schedule.cs

    r434 r435  
    228228        public enum DaysOfWeek 
    229229        { 
    230             SUNDAY = 1, 
    231             MONDAY = 1 << 1, 
    232             TUESDAY = 1 << 2, 
    233             WEDNESDAY = 1 << 3, 
    234             THURSDAY = 1 << 4, 
    235             FRIDAY = 1 << 5, 
    236             SATURDAY = 1 << 6 
     230            SUNDAY = 1 << DayOfWeek.Sunday, 
     231            MONDAY = 1 << DayOfWeek.Monday, 
     232            TUESDAY = 1 << DayOfWeek.Tuesday, 
     233            WEDNESDAY = 1 << DayOfWeek.Wednesday, 
     234            THURSDAY = 1 << DayOfWeek.Thursday, 
     235            FRIDAY = 1 << DayOfWeek.Friday, 
     236            SATURDAY = 1 << DayOfWeek.Saturday 
    237237        } 
    238238 
     
    398398                    } 
    399399                    case ScheduleUnit.MONTHLY: 
    400                         //Increment the month until we are past our current date. 
    401                         nextRun = nextRun.AddMinutes(executionTime.Minute - nextRun.Minute); 
    402                         nextRun = nextRun.AddHours(executionTime.Hour - nextRun.Hour); 
     400                        //Set the next run date to be the day on which the task will run. 
    403401                        nextRun = nextRun.AddDays(-((int)monthlySchedule - nextRun.Day)); 
    404402                        while (nextRun < DateTime.Now) 
Note: See TracChangeset for help on using the changeset viewer.