# schtasks /ru SYSTEM 下跑 build_daily_from_xtdata.py 的 wrapper。 # 输出 tee 到日志,便于 ssh 断开后看进度。不依赖工作目录(脚本内 ROOT 硬编码)。 $ErrorActionPreference = 'Continue' $log = 'C:\sanguo_vnpy_v2\data\xtdata_build.log' $py = 'C:\Python310\python.exe' $script = 'C:\sanguo_vnpy_v2\scripts\data_platform\build_daily_from_xtdata.py' "=== BUILD START $(Get-Date -Format o) ===" | Out-File -FilePath $log -Encoding utf8 & $py -X utf8 $script *>&1 | Tee-Object -FilePath $log -Append "=== BUILD END $(Get-Date -Format o) exit=$LASTEXITCODE ===" | Out-File -FilePath $log -Encoding utf8 -Append