Skip to content

Instantly share code, notes, and snippets.

@pessom
Last active October 5, 2017 20:37
Show Gist options
  • Save pessom/657d01872773327ab07e47b465a0d208 to your computer and use it in GitHub Desktop.
Save pessom/657d01872773327ab07e47b465a0d208 to your computer and use it in GitHub Desktop.
pessom@web:/etc/systemd/system$ cat send_top.service
#Ansible managed
[Unit]
Description=Run send_top scripts initialise timer
After=network.target
[Service]
User=root
Group=root
Type=simple
ExecStart=/srv/www/mcduck-tg/.venv/bin/python3 run.py
WorkingDirectory=/srv/www/mcduck-tg/get_top
[Install]
WantedBy=multi-user.target
pessom@web:/etc/systemd/system$ cat send_top.timer
#Ansible managed
[Unit]
Description=send_top one thread timer
[Timer]
OnCalendar=*-*-* 06:00:00
[Install]
WantedBy=timers.target
$ systemctl enable send_top.timer
$ systemctl start send_top.timer
$ systemctl daemon-reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment