diff --git a/README.md.md b/README.md.md index e9d0cec..8c1f449 100644 --- a/README.md.md +++ b/README.md.md @@ -89,6 +89,8 @@ dotnet --list-runtimes ### 5. 启动验证 +**前台运行(调试用,关掉窗口程序就停)**: + ```powershell cd C:\Mt5Bridge dotnet Mt5Bridge.dll @@ -103,6 +105,28 @@ MT5 Connection: Connected MT5 Bridge ready on http://localhost:8080 ``` +**后台运行(7×24 守护,推荐)**: + +```powershell +cd C:\Mt5Bridge +Start-Process -FilePath "dotnet" -ArgumentList "Mt5Bridge.dll" -WindowStyle Hidden +``` + +启动后不弹任何窗口,关掉 PowerShell 也不会停。 + +**关闭后台进程**: + +```powershell +# 先找 PID +Get-Process -Name dotnet + +# 用 PID 杀掉 +Stop-Process -Id -Force + +# 或者一行全杀 +Get-Process dotnet -ErrorAction SilentlyContinue | Stop-Process -Force +``` + --- ## 三、配置 API Key