Beispiel #1
0
        public void validate_between0600to0659Every5MinutesDaily()
        {
            var cron = new StandardCronExpressionBuilder()
                       .SetFromHourMinuteToHourMinuteString("06:00", "06:59")
                       .WithMinutesEvery(5);

            Assert.Equal("0-59/5 6 * * *", cron.Build());
        }
Beispiel #2
0
        public void validate_every1stDayOfEveryYear()
        {
            var cron = new StandardCronExpressionBuilder().SetEveryYear();

            Assert.Equal("0 0 1 JAN *", cron.Build());
        }
Beispiel #3
0
        public void validate_every1stDayOfEveryWeek()
        {
            var cron = new StandardCronExpressionBuilder().SetEveryDayOfWeek(DayOfWeek.Sunday);

            Assert.Equal("0 0 * * SUN", cron.Build());
        }
Beispiel #4
0
        public void validate_every1minute()
        {
            var cron = new StandardCronExpressionBuilder().WithMinutesEvery(1);

            Assert.Equal("*/1 * * * *", cron.Build());
        }