Appearance
systemd service
On Linux operating systems, you may want to run TBBM PROZESSING using systemd timers.
- Install Python 3.14
- Add a service user
prozessing - Create
/var/prozessingand make it writable for the userprozessing prozessing.pyzto/opt/PROZESSING/prozessing.pyz- Install INI files to
/opt/PROZESSING/ini/ - Install systemd service
PROZESSING@.service(see below) - For each INI file
foobar.ini, create aPROZESSING@foobar.timer(see below) in/etc/systemd/system/ - For each INI file
foobar.ini, runsystemctl enable --now PROZESSING@foobar.timer
Helpful commands for the service and timers:
systemctl status PROZESSING@foobar.service– get status of the servicesystemctl status PROZESSING@foobar.timer– get status of the timersystemctl start --no-block PROZESSING@foobar.service– run service nowsystemctl enable --now PROZESSING@foobar.service– enable and start the timer nowsystemctl list-timers– list all timers
Systemd timers support a variety of timespans and calendar Events, see systemd.time for details.
ini
# /etc/systemd/system/PROZESSING@.service
[Unit]
Description=TBBM PROZESSING for %i
Documentation=https://prozessing.tbbm.at/
[Service]
Environment=LOGS_DIRECTORY=/var/prozessing/logs/
ExecStart=/usr/bin/python /opt/PROZESSING/prozessing.pyz ini/%i.ini
NoNewPrivileges=true
PrivateDevices=true
PrivateIPC=true
PrivateTmp=true
PrivateUsers=true
ProtectClock=true
ProtectControlGroups=true
ProtectHome=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectSystem=strict
ReadWritePaths=/var/prozessing/
Type=oneshot
User=prozessing
WorkingDirectory=/opt/PROZESSING/ini
# /etc/systemd/system/PROZESSING@foobar.timer
[Unit]
Descrptions=foobar
Documentation=https://wiki.example.com/jobs/foobar
[Install]
WantedBy=timers.target
# run daily
[Timer]
OnCalendar=daily
Persistent=true
RandomizedDelaySec=10m
# run daily at 03:10:00
[Timer]
OnCalendar=*-*-* 03:10:00
Persistent=true
RandomizedDelaySec=30s
# run hourly at hh:06:00
[Timer]
OnCalendar=*-*-* *:06:00
Persistent=true
RandomizedDelaySec=30s
# run every 5min
[Timer]
OnBootSec=5min
OnUnitActiveSec=5min
RandomizedDelaySec=30s