Browse Source

定时区间增加是否启用的配置

liweiquan 2 years ago
parent
commit
4c6a8d14ef
1 changed files with 0 additions and 7 deletions
  1. 0 7
      app/utils/cron_utils.py

+ 0 - 7
app/utils/cron_utils.py

@@ -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: