|
@@ -90,13 +90,6 @@ def check_cron_expression(cron_expression):
|
|
|
cron_list = cron_expression.split(' ')
|
|
|
unit_list = ['minute', 'hour', 'day', 'month', 'week']
|
|
|
reg_list = no_section_reg_list if enable == '0' else enable_section_reg_list
|
|
|
- [
|
|
|
- "^(([0-9]|[0-5][0-9]))$",
|
|
|
- "^(([0-9]|[1][0-9]|2[0-3]))$",
|
|
|
- "^((([1-9]|[1-2][0-9]|3[01])(\\,|\\-|\\/){1}([1-9]|[1-2][0-9]|3[01]))|([1-9]|[1-2][0-9]|3[01])|(\\*)|(\\?))$",
|
|
|
- "^((([1-9]|[1][0-2])(\\,|\\-|\\/){1}([1-9]|[1][0-2]))|([1-9]|[1][0-2])|(\\*))$",
|
|
|
- "^((([1-7])(\\,|\\-|\\/){1}([1-7]))|([1-7])|(\\*)|(\\?))$"
|
|
|
- ]
|
|
|
for cron, unit, reg in zip(cron_list, unit_list, reg_list):
|
|
|
match_obj = re.match(reg, cron)
|
|
|
if match_obj is None:
|