示例#1
0
 DateTime GetRuntimeForDaily(DateTime now, DailySchedule schedule)
 {
     var @ref = new DateTime(now.Year, now.Month, now.Day).AddDays((now.DayOfYear-1)%schedule.Every);
     @ref = @ref.AddMinutes(schedule.RunAt.Hour*60 + schedule.RunAt.Minute);
     if (@ref < now) @ref = @ref.AddDays(schedule.Every);
     return @ref;
 }
示例#2
0
 public JobSchedule()
 {
     ScheduleType = JobScheduleType.Weekly;
     Daily = new DailySchedule();
     Weekly = new WeeklySchedule();
     Monthly = new MonthlySchedule();
 }