Create systemd timer systemd
Replacement for cron with Persistent=true for missed runs
cat > /etc/systemd/system/backup.timer <<EOF
[Unit]
Description=Daily backup
[Timer]
OnCalendar=daily
Persistent=true
[Install]
WantedBy=timers.target
EOF
more systemd
all 26 commands →
Set memory limit on service
systemctl set-property myapp.service MemoryMax=512M CPUQuota=50%
Show service resource usage
systemctl status myapp.service | grep -E 'Memory:|CPU:|Tasks:'
List all socket units
systemctl list-units --type=socket --all
Mask a service
systemctl mask snapd.service
Show environment of service
systemctl show myapp.service -p Environment