systemd units

This commit is contained in:
Kumi 2022-08-24 10:54:37 +00:00
parent b80d2851d6
commit 2b470cedb5
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 Import Worker
[Service]
Type=oneshot
# Needs to run as the user Moodle runs as
User=www-data
Group=www-data
WorkingDirectory=/opt/moodle-import-worker/
ExecStart=/usr/bin/env python3 /opt/moodle-import-worker/worker.py

View file

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