diff --git a/src/validators/cron.py b/src/validators/cron.py index a8449b6a..f5daba05 100644 --- a/src/validators/cron.py +++ b/src/validators/cron.py @@ -72,7 +72,7 @@ def cron(value: str, /): return False if not _validate_cron_component(months, 1, 12): return False - if not _validate_cron_component(weekdays, 0, 6): + if not _validate_cron_component(weekdays, 0, 7): return False return True diff --git a/tests/test_cron.py b/tests/test_cron.py index e0b2a199..52482fbb 100644 --- a/tests/test_cron.py +++ b/tests/test_cron.py @@ -22,6 +22,9 @@ "0 3-6 * * *", "*/15 0,6,12,18 * * *", "0 12 * * 0", + "0 12 * * 7", + "0 0 * * 0-7", + "0 0 * * 0,7", "*/61 * * * *", # "5-10/2 * * * *", # this is valid, but not supported yet ],