A nice little guide: https://tecadmin.net/run-shell-script-as-systemd-service/
Shut down or suspend at a specific time
shutdown -h hh:mm schedules a halt, for example shutdown -h 22:35. The reply is "Shutdown scheduled for ... use 'shutdown -c' to cancel", so shutdown -c cancels it; shutdown --help has the rest.
Suspend at a given time instead: sudo echo 'sudo pm-suspend' | at 22:35