Source: https://linuxhandbook.com/schedule-shutdown/
sudo vim /etc/systemd/system/shutdown.timer[Unit]
Description=Timer to shut down the system
[Timer]
OnCalendar=*-*-* 22:30
Persistent=true
[Install]
WantedBy=timers.targetsudo vim /etc/systemd/system/shutdown.service[Unit]
Description=Service to Shutdown the system, run by a timer
[Service]
Type=oneshot
ExecStart=/sbin/shutdown nowsudo systemctl daemon-reload
sudo systemctl enable --now shutdown.timer
systemctl list-timers