Skip to content

Commit 3ed6047

Browse files
committed
add cron types variables
1 parent 7ea4a4f commit 3ed6047

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/croniter/croniter.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@
4848
hash_expression_re = re.compile(
4949
r'^(?P<hash_type>h|r)(\((?P<range_begin>\d+)-(?P<range_end>\d+)\))?(\/(?P<divisor>\d+))?$'
5050
)
51-
VALID_LEN_EXPRESSION = [5, 6]
51+
UNIX_CRON_LEN = 5
52+
SECOND_CRON_LEN = 6
53+
YEAR_CRON_LEN = 7
54+
VALID_LEN_EXPRESSION = set([UNIX_CRON_LEN, SECOND_CRON_LEN])
5255
EXPRESSIONS = {}
5356

5457

0 commit comments

Comments
 (0)