A
A
Arthur Arthur2013-12-12 10:45:45
System administration
Arthur Arthur, 2013-12-12 10:45:45

Problems with hibernation in Windows 7?

Hello!
I will describe the task and the problem that I encountered.
The task is as follows, every day you need to send the PC to hibernation at 19:00, with the condition that after 30 minutes of inactivity.
How do I try to solve it.
I enabled hibernation mode "powercfg -h on", I create a task in the scheduler, in triggers I specify
Start task: Scheduled
Parameters: Daily, Start 19:00, Repeat every: 1 day
In actions:
Action: Start the program
Parameters or script: shutdown
Add argument : -h
Conditions:
Start the task when the computer is idle for: 30 minutes
Wait for idle time for: 5 minutes
Stop when the computer comes out of idle time - yes
Restart on idle resume - yes
Options:
On execution failure, restart after 1 minute
Number of restart attempts 3
Problem.
Task Scheduler started an instance "{903e625b-54ea-42d9-ad0e-a0d7880c4988}" of task "\Scheduled Hibernation" due to a condition defined in a time trigger.
The Task Scheduler failed to start the '\Scheduled Hibernation' task because the computer was not in an idle state.
The Task Scheduler was unable to run task '\Scheduled Hibernation' for user 'artu\user1'. Additional information: Error value: 2147750692.
The Task Scheduler was unable to complete the task '\Scheduled Hibernation'. A restart is being attempted. Additional information: error value: 2147750692.
And so on in a circle, except for the first message.
The task itself

<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.3" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
    <Date>2013-12-12T11:15:53.6735262</Date>
    <Author>ARTUPC\Администратор</Author>
  </RegistrationInfo>
  <Triggers>
    <CalendarTrigger>
      <StartBoundary>2013-12-12T11:20:00</StartBoundary>
      <Enabled>true</Enabled>
      <ScheduleByDay>
        <DaysInterval>1</DaysInterval>
      </ScheduleByDay>
    </CalendarTrigger>
  </Triggers>
  <Principals>
    <Principal id="Author">
      <UserId>ARTUPC\Администратор</UserId>
      <LogonType>Password</LogonType>
      <RunLevel>LeastPrivilege</RunLevel>
    </Principal>
  </Principals>
  <Settings>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
    <AllowHardTerminate>false</AllowHardTerminate>
    <StartWhenAvailable>false</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
    <IdleSettings>
      <Duration>PT5M</Duration>
      <WaitTimeout>PT1M</WaitTimeout>
      <StopOnIdleEnd>true</StopOnIdleEnd>
      <RestartOnIdle>true</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>true</RunOnlyIfIdle>
    <DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
    <UseUnifiedSchedulingEngine>false</UseUnifiedSchedulingEngine>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>PT0S</ExecutionTimeLimit>
    <Priority>7</Priority>
    <RestartOnFailure>
      <Interval>PT1M</Interval>
      <Count>3</Count>
    </RestartOnFailure>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>shutdown</Command>
      <Arguments>-h</Arguments>
    </Exec>
  </Actions>
</Task>

Answer the question

In order to leave comments, you need to log in

6 answer(s)
A
Arthur Arthur, 2013-12-28
@aptu_24

The whole problem is that, as I understand it, Windows is not enough for 5 minutes of downtime, and 10 and 15, it works with at least 30.
Run the task when the computer is idle for: 5 minutes
Expect idle time for: 30 minutes
It works in this scenario, thank you all !

T
Truandale, 2017-02-06
@Truandale

There is a magic cmd command (run as administrator): powercfg /requests
Shows which process is blocking the PC from going to sleep.6949d592f7654e28a6faf98d84b6cf52.PNG57f2ccd273c54d3298ac94b5c921cfbc.PNG

N
nfire, 2013-12-12
@nfire

It's simple - no downtime, no hibernation.
I remember the story with a light bulb and a light sensor - evening comes, it gets dark, the sensor works, the light turns on, it becomes light, the sensor works, the light turns off, gout 10.
And on the topic - try changing the conditions.

N
nfire, 2013-12-12
@nfire

You can try to bind to a trigger by an entry in the event log, for example, when starting a screen saver. I really did not find anything similar in the magazine, but it's like an idea.
Here's a little more on the topic, the mouse didn't let me sleep - forum.ixbt.com/post.cgi?id=print:22:83475

A
Arthur Arthur, 2013-12-12
@aptu_24

I tried without a mouse, even without a keyboard, not on a virtual machine, but on a normal computer, the errors are the same as on virtual machines

K
ka1enka, 2013-12-13
@ka1enka

The powercfg command with the requests key will allow you to understand what exactly is preventing hibernation at the moment.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question