Exemple #1
0
        const int MaxDayInMonthFixAttempts = 12 * 10; //12 months * 10 ; means we check if the date can be found up to 10 years in the future.

        #endregion Fields

        #region Constructors

        internal CronSchedule(MinuteField minuteField, HourField hourField, DayOfMonthField dayOfMonthField, MonthField monthField, DayOfWeekField dayOfWeek)
        {
            MinuteField = minuteField;
            HourField = hourField;
            DayOfMonthField = dayOfMonthField;
            MonthField = monthField;
            DayOfWeek = dayOfWeek;
        }
Exemple #2
0
        private static CronSchedule BuildCronSchedule(string[] fieldExpressions)
        {
            var minuteField = new MinuteField(fieldExpressions[MinuteIndex]);
            var hourField = new HourField(fieldExpressions[HourIndex]);
            var dayOfMonthField = new DayOfMonthField(fieldExpressions[DayOfMonthIndex]);
            var monthField = new MonthField(fieldExpressions[MonthIndex]);
            var dayOfWeek = new DayOfWeekField(fieldExpressions[DayOfWeekIndex]);

            return new CronSchedule(minuteField, hourField, dayOfMonthField, monthField, dayOfWeek);
        }