Feat: Continuous background product scraping service.
This commit is contained in:
33
product_scraping/tcg-scraper.service
Normal file
33
product_scraping/tcg-scraper.service
Normal file
@@ -0,0 +1,33 @@
|
||||
[Unit]
|
||||
Description=TCG Sole Trader Price Scraper
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=teddy
|
||||
WorkingDirectory=/media/teddy/3_6GB-SSD-Storage/Documents/Programming/python/Yu-Gi-Oh_Card_Fetcher/product_scraping
|
||||
ExecStart=/media/teddy/3_6GB-SSD-Storage/Documents/Programming/python/Yu-Gi-Oh_Card_Fetcher/env_api/bin/python3 product_scraper.py
|
||||
|
||||
# Email credentials — fill these in before installing
|
||||
Environment=EMAIL_SENDER=bot@partsltd.co.uk
|
||||
Environment=EMAIL_PASSWORD=@sJt1b5Cliu6
|
||||
Environment=EMAIL_RECIPIENT=teddy@shuffleandskirmish.co.uk
|
||||
# ,teddy@partsltd.co.uk,edward.middletonsmith@gmail.com
|
||||
# Optional overrides (defaults shown):
|
||||
Environment=SMTP_HOST=mail.partsltd.co.uk
|
||||
Environment=SMTP_PORT=465
|
||||
|
||||
# Restart automatically if it crashes, but not if you stop it intentionally
|
||||
Restart=on-failure
|
||||
RestartSec=30
|
||||
|
||||
# Give the browser enough time to shut down cleanly on stop
|
||||
TimeoutStopSec=30
|
||||
|
||||
# Send stdout/stderr to the journal (view with: journalctl -fu tcg-scraper)
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user