I had written this code when I was in my first year of university (a long time ago XD).
Is very simple and short.
Only needs to select hibernate, restart, or shutdown.
And that's all folks!
Script sencillo para hibernar o reiniciar windows segun la cantidad de minutos programados
C#