添加后台运行命令

This commit is contained in:
2026-07-07 14:14:17 +08:00
parent 8e8aece816
commit d4366550bb
+24
View File
@@ -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 <PID号> -Force
# 或者一行全杀
Get-Process dotnet -ErrorAction SilentlyContinue | Stop-Process -Force
```
---
## 三、配置 API Key