33 lines
586 B
Markdown
33 lines
586 B
Markdown
# EXTRAS: systemd Timer (optional)
|
|
|
|
## /etc/systemd/system/rag-crawler.service
|
|
```
|
|
[Unit]
|
|
Description=RAG Crawler Update (drip)
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
User=root
|
|
ExecStart=/bin/bash -lc 'source /srv/ai/rag-crawler/venv/bin/activate && python3 /srv/ai/rag-crawler/crawler/main.py --mode=drip --budget 1'
|
|
```
|
|
|
|
## /etc/systemd/system/rag-crawler.timer
|
|
```
|
|
[Unit]
|
|
Description=Run RAG Crawler drip hourly
|
|
|
|
[Timer]
|
|
OnCalendar=hourly
|
|
Persistent=true
|
|
|
|
[Install]
|
|
WantedBy=timers.target
|
|
```
|
|
|
|
## Enable
|
|
```
|
|
systemctl daemon-reload
|
|
systemctl enable --now rag-crawler.timer
|
|
```
|