fix 注释跳过

This commit is contained in:
thsrite
2024-04-13 22:57:28 +08:00
parent 4e2d83d80e
commit b6adf07ced
2 changed files with 6 additions and 0 deletions

View File

@@ -67,6 +67,9 @@ class CustomCommand(_PluginBase):
# 分别执行命令,输入结果
for time_conf in self._time_confs.split("\n"):
if time_conf:
if str(time_conf).startswith("#"):
logger.info(f"已被注释,跳过 {time_conf}")
continue
if str(time_conf).count("#") == 2 or str(time_conf).count("#") == 3:
name = str(time_conf).split("#")[0]
cron = str(time_conf).split("#")[1]