systemd units
This commit is contained in:
parent
141a7ab5a8
commit
7b5b4eb17c
2 changed files with 21 additions and 0 deletions
12
systemd/moodle-export-worker.service
Normal file
12
systemd/moodle-export-worker.service
Normal 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
|
9
systemd/moodle-export-worker.timer
Normal file
9
systemd/moodle-export-worker.timer
Normal file
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=Run Moodle Export Worker every minute
|
||||
|
||||
[Timer]
|
||||
OnBootSec=1min
|
||||
OnUnitActiveSec=1min
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
Loading…
Reference in a new issue