Skip to content

Instantly share code, notes, and snippets.

@jwc20
Last active April 29, 2024 13:15
Show Gist options
  • Save jwc20/b057c9f10927862c159ec69683ce2d46 to your computer and use it in GitHub Desktop.
Save jwc20/b057c9f10927862c159ec69683ce2d46 to your computer and use it in GitHub Desktop.
sudo systemctl daemon-reload
sudo systemctl stop 00waasu_scraper.service
sudo systemctl disable 00waasu_scraper.service
sudo systemctl enable --now waasu_scraper.timer
sudo systemctl status waasu_scraper.timer 00waasu_scraper.service
# /etc/systemd/system/00waasu_scraper.service
[Unit]
Description=Work At A Startup Scraper
Wants=waasu_scraper.timer
[Service]
Type=oneshot
User=cjw
ExecStart=/usr/bin/python3.10 /home/cjw/Development/waasuapi/example.py
[Install]
WantedBy=multi-user.target
# /etc/systemd/system/waasu_scraper.timer
[Unit]
Description=Run waasu_scraper every day
Requires=waasu_scraper.service
[Timer]
OnCalendar=*-*-* 0/24:00:00
Persistent=true
[Install]
WantedBy=timers.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment