

single line
here’s a single line for you which creates a one-shot service+timer in one go, suspending the system in 4 hours:
systemd-run --on-active=4h --unit=suspend-after-4h /usr/bin/systemctl suspend
If you want it to run repeatedly, simply replace --on-active with --on-calendar="*-*-* 04:00:00" for example.



windows, yes: https://learn.microsoft.com/windows/wsl/systemd
for Mac you should probably use macOS’s launchd services: https://www.launchd.info/