diff --git a/__pycache__/config.cpython-312.pyc b/__pycache__/config.cpython-312.pyc new file mode 100644 index 0000000..aea7865 Binary files /dev/null and b/__pycache__/config.cpython-312.pyc differ diff --git a/__pycache__/database.cpython-312.pyc b/__pycache__/database.cpython-312.pyc new file mode 100644 index 0000000..57171b9 Binary files /dev/null and b/__pycache__/database.cpython-312.pyc differ diff --git a/__pycache__/routes_config.cpython-312.pyc b/__pycache__/routes_config.cpython-312.pyc new file mode 100644 index 0000000..a7d3a53 Binary files /dev/null and b/__pycache__/routes_config.cpython-312.pyc differ diff --git a/__pycache__/routes_cron.cpython-312.pyc b/__pycache__/routes_cron.cpython-312.pyc new file mode 100644 index 0000000..c32205e Binary files /dev/null and b/__pycache__/routes_cron.cpython-312.pyc differ diff --git a/__pycache__/routes_email.cpython-312.pyc b/__pycache__/routes_email.cpython-312.pyc new file mode 100644 index 0000000..7617d06 Binary files /dev/null and b/__pycache__/routes_email.cpython-312.pyc differ diff --git a/__pycache__/routes_project.cpython-312.pyc b/__pycache__/routes_project.cpython-312.pyc new file mode 100644 index 0000000..075a6c0 Binary files /dev/null and b/__pycache__/routes_project.cpython-312.pyc differ diff --git a/__pycache__/routes_system.cpython-312.pyc b/__pycache__/routes_system.cpython-312.pyc new file mode 100644 index 0000000..8a20d42 Binary files /dev/null and b/__pycache__/routes_system.cpython-312.pyc differ diff --git a/__pycache__/templates.cpython-312.pyc b/__pycache__/templates.cpython-312.pyc new file mode 100644 index 0000000..c09d303 Binary files /dev/null and b/__pycache__/templates.cpython-312.pyc differ diff --git a/__pycache__/utils.cpython-312.pyc b/__pycache__/utils.cpython-312.pyc new file mode 100644 index 0000000..0a2e6ce Binary files /dev/null and b/__pycache__/utils.cpython-312.pyc differ diff --git a/logs/app.log b/logs/app.log index fb87f5e..80e9f65 100644 --- a/logs/app.log +++ b/logs/app.log @@ -30314,3 +30314,6 @@ Press CTRL+C to quit [2026-06-01 12:29:39] 访问地址: http://localhost:16022 [2026-06-01 12:29:39] 进程PID: 784244 [2026-06-01 12:29:39] ================================================== +[2026-06-01 12:30:38] ⚠️ 进程收到 SIGTERM 信号,即将退出! +[2026-06-01 12:31:16] 项目服务管理面板 v3.4.0 初始化完成 +[2026-06-01 12:31:16] 启动 项目服务管理面板,端口: 16022 diff --git a/utils.py b/utils.py index 0744b71..72769fc 100644 --- a/utils.py +++ b/utils.py @@ -195,6 +195,35 @@ def parse_cron_expression(expr): return ' '.join(desc) if desc else expr +def cron_expression_to_human(expr): + """更友好的人类可读格式""" + parts = expr.split() + if len(parts) != 5: + return expr + + minute, hour, day, month, weekday = parts + + # 特殊模式 + patterns = [ + ('0 4 * * *', '每天凌晨4点'), + ('0 0 * * *', '每天午夜0点'), + ('*/5 * * * *', '每5分钟'), + ('*/10 * * * *', '每10分钟'), + ('*/20 * * * *', '每20分钟'), + ('*/30 * * * *', '每30分钟'), + ('0 */1 * * *', '每小时'), + ('0 */2 * * *', '每2小时'), + ('0 9 * * 1', '每周一9点'), + ('0 9 * * 1-5', '每周一到五9点'), + ] + + for pattern, desc in patterns: + if expr == pattern: + return desc + + # 通用解析 + return parse_cron_expression(expr) + def guess_cron_name(command): """从命令推断任务名称"""