Shutdown command hibernate with timer not working


  1. Posts : 163
    Windows 10
       #1

    Shutdown command hibernate with timer not working


    This question already has answers here:
    Hibernate computer with a timeout from command line on Windows 7 (12 answers)
    how can I use the shutdown command to hibernate the computer in X hours? [duplicate] (3 answers)
    Your post has been associated with similar questions. If these questions don’t resolve your question, ask a new one.

    Closed 1 min ago.

    (Private feedback for you)

    I'm trying to hibernate my PC after a number of seconds (as I can't see a command to sleep, which would be best).

    These work:

    shutdown /h
    shutdown /s /t 5
    However, this one doesn't:

    shutdown /h /t 5
    Which should hibernate after 5 seconds, all I get is:

    C:\WINDOWS\system32>shutdown /h /t 5
    Usage: shutdown [/i | /l | /s | /sg | /r | /g | /a | /p | /h | /e | /o] [/hybrid] [/soft] [/fw] [/f]
    [/m \\computer][/t xxx][/d [p|u:]xx:yy [/c "comment"]]

    No args Display help. This is the same as typing /?.
    /? Display help. This is the same as not typing any options.
    /i Display the graphical user interface (GUI).
    This must be the first option.
    /l Log off. This cannot be used with /m or /d options.
    ...and so on

    Any help much appreciated

    Note: Paul Black gave me a fantastic script to sleep my PC, I'd just like to know why shutdown /s /t 5 is not working.
    Paul gave his neat script here:
    Any command to sleep PC after x seconds?
      My Computer


  2. Posts : 42,989
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2

    Hi, workarounds here: (not tried personally)
    Hibernate computer with a timeout from command line on Windows 7 - Super User

    Related-
    Dont sleep (freeware) may be of interest.

    It can be used to prevent sleep/hibernate...

    But also can be used to sleep/shut down etc after a preset time.
    Don't Sleep for Windows HISTORY
    Download Don't Sleep 8.51
      My Computers


  3. Posts : 16,949
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #3

    Sleep shortcut - using NirCmd


    Frank15 said:
    I'm trying to hibernate my PC after a number of seconds (as I can't see a command to sleep, which would be best).
    Frank,

    I use NirSoft NirCmd to sleep my computer. This method does not depend on having hibernate enabled / disabled; it can be in whatever state suits you.

    Telling the computer to Sleep after a given time can be done with a shortcut that uses this as its Target
    Code:
    C:\Windows\System32\cmd.exe /c "TimeOut /T 5 >nul & C:\Tools\NirCmd\NirCmd.exe standby"
    - I've used 5 seconds in that example
    - I've set the shortcut to use a Minimised window because I have no interest in seeing its cmd window appear.
    - I've set the shortcut to use a particular icon so I know what it is that appears in my Taskbar during that period
    Shutdown command hibernate with timer not working-sleepy-icon.png
    - I have stuck my NirCmd in the folder C:\Tools\NirCmd You'll need to use the path to wherever you've stuck it.
    - I put all my portable applications & scripts within a C:\Tools folder - Set up my Tools folder ditty - TenForums

    I've enclosed a zipped copy of my shortcut so all you'll have to set up is the path to wherever you've stuck NirCmd
    Sleep after 5 secs.zip
    - In this zipped example, I've also used 5 secs but have used a simpler path to NirCmd [which you will have to alter anyway but for reasons that baffle me only a minute later I thought a shorter path would help you].
    - As with many downloaded items, you'll have to Unblock the zip or the shortcut before use.
    Shutdown command hibernate with timer not working-unblock-zip.png

    All the best,
    Denis
    Last edited by Try3; 16 Jan 2022 at 09:53.
      My Computer


  4. Posts : 16,949
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #4

    Frank,

    And if you have any questions about
    Try3 said:
    I put all my portable applications & scripts within a C:\Tools folder - Set up my Tools folder ditty - TenForums
    then you can post them here rather than in that linked thread itself.


    All the best,
    Denis
      My Computer


  5. Posts : 163
    Windows 10
    Thread Starter
       #5

    Try3 said:
    Frank,

    I use NirSoft NirCmd to sleep my computer. This method does not depend on having hibernate enabled / disabled; it can be in whatever state suits you.

    Telling the computer to Sleep after a given time can be done with a shortcut that uses this as its Target
    Code:
    C:\Windows\System32\cmd.exe /c "TimeOut /T 5 >nul & C:\Tools\NirCmd\NirCmd.exe standby"
    - I've used 5 seconds in that example
    - I've set the shortcut to use a Minimised window because I have no interest in seeing its cmd window appear.
    - I've set the shortcut to use a particular icon so I know what it is that appears in my Taskbar during that period
    Shutdown command hibernate with timer not working-sleepy-icon.png
    - I have stuck my NirCmd in the folder C:\Tools\NirCmd You'll need to use the path to wherever you've stuck it.
    - I put all my portable applications & scripts within a C:\Tools folder - Set up my Tools folder ditty - TenForums

    I've enclosed a zipped copy of my shortcut so all you'll have to set up is the path to wherever you've stuck NirCmd
    Sleep after 5 secs.zip
    - In this zipped example, I've also used 5 secs but have used a simpler path to NirCmd [which you will have to alter anyway but for reasons that baffle me only a minute later I thought a shorter path would help you].
    - As with many downloaded items, you'll have to Unblock the zip or the shortcut before use.
    Shutdown command hibernate with timer not working-unblock-zip.png

    All the best,
    Denis
    Great advice, Thanks!
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 12:37.
Find Us




Windows 10 Forums