18 lines
977 B
PowerShell
18 lines
977 B
PowerShell
# bs_daily_wrapper.ps1 — sanguo-bs-daily schtask wrapper (18:05 baostock 日任务单入口)
|
|
# 2026-08-20 重组: 串行 bs_eod(个股 EOD+15m+指数段) → bs_fundamentals(季频财务+业绩报告)
|
|
# —— 同一 schtask 内先后子进程, 同 IP 永不双 baostock 连接(根治 08-20 撞点: eod 加
|
|
# 指数段后 ETA 23:00+ 与旧 23:05 bs-fund 重叠)。
|
|
# BS_DAILY_LIMIT=15000: eod 病态重试硬顶(常态 ~11.1k 不受影响), 与 fund 30000 合计
|
|
# ≤45.1k < 48k/IP/天(配额铁律)。
|
|
$env:http_proxy = ''
|
|
$env:https_proxy = ''
|
|
$env:all_proxy = ''
|
|
$env:BS_DAILY_LIMIT = '15000'
|
|
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 "bs_daily_$ts.txt"
|
|
C:\Python310\python.exe -X utf8 C:\sanguo_vnpy_v2\scripts\data_platform\bs_daily_main.py *>> $log
|
|
exit $LASTEXITCODE
|