Sleep and Wake Up

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

This is a video to help you make your Computer naturally sleep and wake up on a time schedule.

This can be used for office computers, servers and virtual servers, public computers etc.

As an idea if you use Deep Freeze after the wake up you can make a time scheduled restart to
return the computer to the frozen state and again be ready for the users.

Steps:

1. Disable hybrid sleep / hibernation and enable wake up timers. (Optional, but recommended)

The issue is that sometimes, hybrid sleep / hibernation can interfere with an automated wake
script, depending on your configuration.

Open a command prompt as an administrator. To do this in Windows 7, click the Start button,
type “cmd” (without the quotes) and then right-click cmd.exe and choose Run as administrator.
Type “powercfg -h off” (without the quotes) and press Enter.

Find the power management of your system and find the advanced power options. Under Sleep
options enable all the wake timers.

2. Create a script file (.bat) to put your computer to sleep.

To create, sleep batch file open up Notepad and type the following: “Rundll32.exe
Powrprof.dll,SetSuspendState Sleep” (without the quotes), Click File and Save As… choose
All files *.* and save your file with a “.bat” extension. Something like “sleep.bat”

3. Create a script file (.bat) to wake your computer.

There is no a command line to wake your computer, but this command will be used in order to
wake up the computer to run it.

Create it opening Notepad and typing the following: “echo hello” (without the quotes) Click
File - Save As… choose All files *.* and save your file with a “.bat” extension. Something like
“wake.bat”.

4. Schedule your computer to sleep and wake at a certain time.

Run Task Scheduler. The fastest way to get to it is by clicking the Start button and typing Task
Scheduler.

Click Action and then Create Task… In the general tab, give it a name like “Sleep” make your
choice in the security options section.

In the Triggers tab, click New… Set the task up to begin the task “On a schedule” and choose
daily and plug-in the time when you want it to run. Click OK.
Click the Actions tab and click New… Set the action to “Start a program” and browse to your
sleep.bat script. Click OK.

If you want to use this methods on laptop I recommend you to uncheck the settings in the Power
section.

If you want to prevent the computer from sleeping if programs are running or someone is using
the computer, then use the settings in the Conditions tab.

You’re done with this part. If you want to test it out, you can add a new trigger that sets it in
motion 2-3 minutes from now.

Next, let’s make a Wake task. Click Action and Create Task… and name it Wake in the general
tab.

Then, create a daily trigger with the time you want to wake your computer.

Next, go to the Actions tab and make an action to run your wake.bat script.

Now, go to the Conditions tab. Here, make sure that the “Wake the computer to run this task”
option is checked.

************** HIBERNATE ********************


”rundll32.exe PowrProf.dll, SetSuspendState Hibernate”.
*********************************************

************** SUSPENDER ********************


“Rundll32.exe Powrprof.dll,SetSuspendState Sleep”

*************************************************

Politicas
Hay dos políticas ejecutando gpedit.msc
Ingles:
ComputerConfiguration\AdministrativeTemplates\System\Power
Management\SleepSettings
Español
Configuración del Equipo\Plantillas Administrativas\Sistema\
Administración de energía\SolicitarContraseñaAlReanudar..
Llamadas:
Require a Password When a COmputer Wakes (PlugIn)
Require a Password When a Computer Wakes (on Battery)
10 hrs = 36000

You might also like