Discussion Locked

Automatic shutdown

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Is it possible to have a scheduled task that will shut down the machine at a certain time each day ?

7 replies

by jackofalltech

A free solution would be to create a .BAT file as follows (all on one line) and schedule it with AT.

@C:\WINDOWS\RUNDLL32.EXE shell32.dll,SHExitWindowsEx x

Where x is either 0, 1, 2, 4 or 8 (or a combination) based on the following table:0 - Log off: Shuts down all running processes, then logs the user off.
1 - Shutdown: Shuts down the system to a point at which it is safe to turn off the power. All file buffers have been flushed to disk, and all running processes have stopped.
2 - Reboot: Shut down and restart the system.
4 - Force (Win98 Only): Forces processes to terminate. When this flag is set, Windows does not query running applications to inform them that Windows is shutting down. This can cause the applications tolose data, therefore, you should only use this flag in an emergency.
8 - Power Off (Win98 Only): Shuts down the system and turns off the power. The system must support the power

Ralph

by adam8976

I would download shutdown.exe from microsoft. I use this to reboot a server at 5am every morning, just add it into the scheduled tasks.

This discussion is closed to new replies.