MSDOS command for hibernation

Hello,
I would like to create a script to put a PC into hibernation.
I have the command shutdown -h that allows the PC to enter hibernation, but I would like to pass a parameter so that the machine wakes up from hibernation at a specified time.

Thank you

3 answers

  1. Hello.

    First, to activate hibernation, the command is

    powercfg -h on

    And to disable it

    powercfg -h off

    Then you can simply create two Batch files

    (files with the .BAT extension) containing this:

    Hibernation_on.bat
    ............................................................................
    cmd.exe /k
    cls
    @echo off
    powercfg -h on
    pause
    exit

    .............................................................................

    Hibernation_off.bat
    .............................................................................
    cmd.exe /k
    cls
    @echo off
    powercfg -h off
    pause
    exit

    ............................................................................

    Then you just need to insert these two files into the Task Scheduler.

    (Of course, do not include the dashes, it's just to separate).

    You can also use the AT command

    In the command prompt, type

    at /?

    to see all its options.
    1
    1. Unfortunately, I fear that this will not work to disable hibernation.
      Because in hibernation, Windows is like "turned off"; only the RAM is saved, so the task scheduler will not run and the PC will not wake up from hibernation.
      0
      1. My question would be to find a solution to put a machine into hibernation but have it turn back on by itself at a given time.
        Is it possible without Wake On Lan?
        0
        1. You need to configure your BIOS for scheduled reboot.
          0