Windows lacks the linux ’shutdown’ command, so it is a pain to get it to schedule a reboot in the future. Linux’s shutdown command make this easy, just issue the command ’shutdown -r +60′ for example to reboot an hour in the future.
No such luck in Windows, you need to download a separate program to do this. It is a sysinternals program, you might remember sysinternals from such utilies like FileMon and ProcessMonitor.
The program we use for this is called PsTools and more specifically the file psshutdown.exe.
Place psshutdown.exe into a directory for future use, for this example we will use c:\tools\.
Then open a command prompt and type the following command:
at 2:00am c:\tools\psshutdown.exe -r -f -c -t 10 /accepteula
This will result in:
Added a new job with ID = 1
You can verify this task has been added by looking at the Scheduled Tasks - the job name will be At1 if you haven’t scheduled any other tasks via the command line.
If all goes will, Windows will reboot at 2:00am, or your specified time.
« Firefox Blinking Cursor Issue | Zero-Day Flash Exploit - Another Reason To Run NoScript »



Comments
Actually, the shutdown command is built into virtually every version of Windows released in the last 8 years:
XP (Pro/Tablet/Media Center Editions)
Vista (All Editions)
Server 2003 (All Editions)
Server 2008 (All Editions)
The only exception is XP Home Edition.
Syntax example: shutdown -r -f -t 10
In fact, your use of psshutdown with Scheduled Tasks is silly because one of the main reasons to use psshutdown instead of the built-in shutdown is that the -t option of psshutdown supports HH:MM (time in 24-hour format) in addition to NN (number of seconds). So your example could have been:
psshutdown -r -f -c -t 02:00 /accepteula
Which is better because it does not rely upon the Task Scheduler service being enabled and running. Instead, psshutdown temporarily installs its own service. Occasionally, anti-malware which has been set to paranoid settings may block this, but typically such settings would also block the addition of a Scheduled Task.
I\’m assuming you mean turn of the computer, and not restart it. Please tell me if I\’m wrong. And if I\’m right - my comment is this: I would like to know how to schedule a shut-down of a mac computer.