# xt_eod_wrapper.ps1 - sanguo-xt-eod schtask wrapper (21:00 xtdata ETF/fund EOD increment) # plan A: ETF/fund (baostock blind zone) -> dbbardata('d') # 2026-09-10 data leg switch: xtquant via big-QMT redis bridge shim # (xtquant_bridge PYTHONPATH -> in-process full market data). Replaces the dead # miniQMT 58610 standalone service (IPythonApiServer stopped self-starting after # the 09-09 accidental kill; root cause unresolved). # NOTE: keep this file ASCII-only (PS 5.1 reads no-BOM files as ANSI/GBK). $env:PYTHONPATH = 'C:\sanguo_bigqmt\xtquant_bridge;C:\sanguo_vnpy_v2;C:\sanguo_vnpy_v2\vnpy_v4.4.0;C:\sanguo_vnpy_v2\vnpy_qmt_v0.3.3' $env:BIGQMT_ACCOUNT_ID = '66639661' $env:BIGQMT_REDIS_PASSWORD = (Select-String -Path 'C:\redis\redis.conf' -Pattern '^requirepass\s+(\S+)' | ForEach-Object { $_.Matches[0].Groups[1].Value }) Set-Location C:\sanguo_vnpy_v2 $ts = Get-Date -Format 'yyyyMMdd_HHmmss' $logDir = 'C:\sanguo_vnpy_v2\data\migration_logs' if (-not (Test-Path $logDir)) { New-Item -ItemType Directory -Path $logDir -Force | Out-Null } $log = Join-Path $logDir "xt_eod_$ts.txt" C:\Python310\python.exe -X utf8 C:\sanguo_vnpy_v2\scripts\data_platform\xt_eod.py *>> $log exit $LASTEXITCODE