1690f4e248
- setup_scheduler.ps1: chcp 65001, StockBot_Bot 제거, XML 경로 자동 교정 - run_morning/midday/evening.ps1: chcp 65001 + PYTHONUTF8=1 추가 - app/main.py: sys.stdout.reconfigure(encoding=utf-8) 추가 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
35 lines
1.4 KiB
PowerShell
35 lines
1.4 KiB
PowerShell
# claude_morning 실행 스크립트
|
|
# 작업 스케줄러에서 08:15에 실행 (평일)
|
|
|
|
chcp 65001 | Out-Null # 콘솔 코드페이지 UTF-8 (외부 프로세스 출력 디코딩)
|
|
$OutputEncoding = [System.Text.Encoding]::UTF8
|
|
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
|
$env:PYTHONUTF8 = "1"
|
|
$env:PYTHONIOENCODING = "utf-8"
|
|
|
|
$PROJECT = Split-Path -Parent $PSScriptRoot
|
|
$LOG = "$PROJECT\logs\morning.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] claude_morning 시작`n", $utf8)
|
|
|
|
& $CLAUDE -p "/morning" --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] claude_morning 완료`n", $utf8)
|
|
|
|
# 모닝 완료 후 봇 시작 (daily_context.json 생성 보장 후 시작)
|
|
$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)
|