We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9664609 commit 5f4622fCopy full SHA for 5f4622f
web/admin/setup/init_cron.py
@@ -27,14 +27,22 @@ def init_cron():
27
28
if file == "":
29
return True
30
-
31
- # content = mw.execShell("crontab -l")
+
32
with open(file) as f:
33
for line in f.readlines():
34
cron_line = line.strip()
35
if cron_line.startswith("#"):
36
continue
37
- print(cron_line)
+ cron_expression = cron_line.split(maxsplit=5)[0] # 提取前 5 个字段(* * * * *)
38
+ command = cron_line.split(maxsplit=5)[5] # 提取命令部分
39
40
+ # 面板计划任务过滤
41
+ if command.startswith("/www/server/cron"):
42
+ continue
43
44
45
+ print(command)
46
47
# cron_list = content.split("\n")
48
# print(cron_list)
0 commit comments