[Unit]
Description=A 股 Deep Research 定时调度
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=pi
Group=pi
WorkingDirectory=/home/pi/cc-projects/news
ExecStart=/home/pi/cc-projects/news/.venv/bin/python -m scripts.run_scheduler
Restart=always
RestartSec=30

# 日志
StandardOutput=append:/home/pi/cc-projects/news/logs/scheduler-stdout.log
StandardError=append:/home/pi/cc-projects/news/logs/scheduler-stderr.log

# 环境变量
Environment="PATH=/home/pi/cc-projects/news/.venv/bin:/usr/local/bin:/usr/bin:/bin"
Environment="TZ=Asia/Shanghai"

[Install]
WantedBy=multi-user.target
