[Unit] Description=Claude Code Agent Pipeline After=network-online.target Wants=network-online.target [Service] Type=oneshot # CUSTOMIZE: User that runs the agent User=deploy # CUSTOMIZE: Working directory (your project root) WorkingDirectory=/home/deploy/my-agent-project # CUSTOMIZE: Path to your automation script ExecStart=/bin/bash /home/deploy/my-agent-project/automation/run-pipeline.sh # Environment variables (API keys etc.) EnvironmentFile=/home/deploy/.env # Timeout for the pipeline run TimeoutStartSec=600 [Install] WantedBy=multi-user.target # SETUP: # 1. Copy to /etc/systemd/system/claude-agent.service # 2. Customize User, WorkingDirectory, ExecStart, EnvironmentFile # 3. Enable: sudo systemctl enable claude-agent # # For recurring runs, create a timer: # /etc/systemd/system/claude-agent.timer # # [Unit] # Description=Run Claude agent pipeline daily # # [Timer] # OnCalendar=*-*-* 07:00:00 # Persistent=true # # [Install] # WantedBy=timers.target # # Then: sudo systemctl enable --now claude-agent.timer