systemd units

This commit is contained in:
Kumi 2022-08-24 10:56:40 +00:00
parent 141a7ab5a8
commit 7b5b4eb17c
Signed by: kumi
GPG key ID: ECBCC9082395383F
2 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,12 @@
[Unit]
Description=Moodle Export Worker
[Service]
Type=oneshot
# Needs to run as the user Moodle runs as
User=www-data
Group=www-data
WorkingDirectory=/opt/moodle-export-worker/
ExecStart=/usr/bin/env python3 /opt/moodle-export-worker/worker.py

View file

@ -0,0 +1,9 @@
[Unit]
Description=Run Moodle Export Worker every minute
[Timer]
OnBootSec=1min
OnUnitActiveSec=1min
[Install]
WantedBy=timers.target