public static CronTemplate ForDays(DaysOfWeek daysOfWeek, int hour, int minute) { var daysOfWeekList = GetDaysListFromEnum(daysOfWeek); var cronTemplate = new CronTemplateBuilder() .WithMinutes(minute) .WithHours(hour) .WithAllDaysOfMonth() .WithDaysOfWeek(daysOfWeekList.ToArray()) .WithAllMonths() .Build(); return(cronTemplate); }
public static CronTemplate ForDays(DaysOfWeek daysOfWeek, string time) { var daysOfWeekList = GetDaysListFromEnum(daysOfWeek); var timeValue = DateStringParser.ParseTime(time); var cronTemplate = new CronTemplateBuilder() .WithMinutes(timeValue.Minute) .WithHours(timeValue.Hour) .WithAllDaysOfMonth() .WithDaysOfWeek(daysOfWeekList.ToArray()) .WithAllMonths() .Build(); return(cronTemplate); }