Scheduling Windows Server Rebooting

[ This Blog Was Moved To : ]

Recently, I was asked to schedule rebooting of some windows server 2003 machines.

I previously knew the command for shutting down is basically

shutdown -r

Which is with some addition if any one wants

shutdown /r /t 60 /c "Reconfiguring myapp.exe" /f /d p:4:1

(You can find full details at this page)

But, The error I got is that when I try to write this command in a batch file (.bat file) and schedule its execution, it does not run and shows a CMD window showing the command infinitely yet not executing it.

At first, I thought that a low privilege was assigned to theĀ  account I’m using to log into the system.

But, A friend suggested executing the command from Start -> RUN , and I did. It worked !!!!!

So, I thought ; If I can schedule running the command itself not a batch file, it should work. And I was right !!

So, I scheduled the shutdown command like this :

Note : You can select a program and change it later ( using advanced task properties ) to the shutdown command above.

And It was Fixed,

Thanks to ( Hesham Seiam )