b54d61531f
StockBot_Bot 스케줄러(07:55) 비활성화. run_morning.ps1이 /morning 완료 후 /start-bot 실행. daily_context.json 생성 보장 후 봇 시작으로 컨텍스트 적용 확인 가능. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
33 lines
1.3 KiB
PowerShell
33 lines
1.3 KiB
PowerShell
# claude_morning 실행 스크립트
|
|
# 작업 스케줄러에서 08:15에 실행 (평일)
|
|
|
|
$OutputEncoding = [System.Text.Encoding]::UTF8
|
|
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
|
$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)
|