Use the built-in Windows shutdown command with a time delay:
shutdown /s /t 3600 -- Shut down in 1 hour (3600 seconds)
shutdown /r /t 1800 -- Restart in 30 minutes (1800 seconds)
shutdown /a -- Abort a pending shutdown
You can also use Windows Task Scheduler to create recurring shutdown or restart tasks at specific times.