Files
Stock-trading-programming/scripts/run_bot.ps1
T
whdwo798 7c9f73f63d [2026-05-15] 스케줄러 인코딩·권한·Discord 알림 수정
- run_*.ps1: PSScriptRoot 경로, claude.cmd 전체경로, UTF-8 BOM 저장으로 한글 깨짐 해결
- settings.json: PYTHONUTF8=1 환경변수, 글로벌 bypassPermissions 추가
- discord_notify.py: 커밋 메시지 불릿 + 커밋 완료 여부만 전송하도록 간소화

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 15:00:10 +09:00

23 lines
857 B
PowerShell

# 매매 봇 시작 스크립트
# 작업 스케줄러에서 07:55에 실행 (평일)
$OutputEncoding = [System.Text.Encoding]::UTF8
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$env:PYTHONIOENCODING = "utf-8"
$PROJECT = Split-Path -Parent $PSScriptRoot
$LOG = "$PROJECT\logs\bot_start.log"
$CLAUDE = "C:\Users\whdwo\AppData\Roaming\npm\claude.cmd"
$utf8 = New-Object System.Text.UTF8Encoding $false
Set-Location $PROJECT
$timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
[System.IO.File]::AppendAllText($LOG, "[$timestamp] /start-bot 실행`n", $utf8)
& $CLAUDE -p "/start-bot" --dangerously-skip-permissions 2>&1 |
ForEach-Object { [System.IO.File]::AppendAllText($LOG, "$_`n", $utf8) }
$timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
[System.IO.File]::AppendAllText($LOG, "[$timestamp] /start-bot 완료`n", $utf8)