Windows 10: Cmd sleep command but with timer

Discus and support Cmd sleep command but with timer in Windows 10 Support to solve the problem; If you could help i found :\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState Sleep but i need -t 180 secs which doesnt work with this and i... Discussion in 'Windows 10 Support' started by Cromax, Nov 6, 2017.

  1. Cromax Win User

    Cmd sleep command but with timer


    If you could help i found :\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState Sleep but i need -t 180 secs which doesnt work with this and i dont want to use third party programs..

    tyvm

    :)
     
    Cromax, Nov 6, 2017
    #1

  2. Can wake timers be cancelled from the command prompt or a script?

    I have been trying until I bleed to stop Windows 10 waking from sleep, but it seems there is absolutely no way of stopping it setting wake timers to perform updates. So I am reduced to running "powercfg -waketimers" every time I put the machine to sleep
    and then disabling any wake timers in the task scheduler control panel, which takes an annoying amount of time. Is there instead a way of cancelling wake timers from the command line, and would it be possible to automate the cancelling of wake timers with
    a script?
     
    swamp#thing, Nov 6, 2017
    #2
  3. After installing Windows 10 (July 2015) my Surface does not sleep automatically, why?

    I had expanded everything that looked as though it could expand. :-}

    But, since I last wrote I found this page:

    How to Prevent Your Computer From Waking Up Accidentally

    I finally made my way to the sleep command and disabled all the "Allow wake timers". I'll know in a day or two if that works and get back to this thread.

    That sleep command was in -

    Control Panel\Hardware and Sound\Power Options\Edit Plan Settings

    Then "Change advanced power settings"

    Then scroll down to 'Sleep'

    Open that and scroll to 'Allow wake timers'

    Open that and change the settings.

    I am keeping my fingers crossed!

    Cmd sleep command but with timer :) Gina
     
    GinaLancaster, Nov 6, 2017
    #3
  4. Cmd sleep command but with timer

    In CMD you can use "timeout" or in PowerShell you can use "Start-Sleep" to start a 180s timer. Just create a script with the timeout command followed by the SetSuspendSleep command.

    Or if you want it in one line you can do
    Code: timeout /t 180&&rundll32.exe powrprof.dll,SetSuspendState Sleep[/quote]
     
    PolarNettles, Nov 7, 2017
    #4
  5. Cromax Win User
    [/quote] ty i actually thought timeout or sleep command but wasnt sure thnx

    for some reason it doesnt work lol .. powershell doesnt recognize && operator so to line bat scripted worked
     
    Cromax, Nov 7, 2017
    #5
  6. Sorry, forgot to mention that "&&" only works in CMD. You use ";" to concatenate commands in PowerShell.
     
    PolarNettles, Apr 4, 2018
    #6
Thema:

Cmd sleep command but with timer

Loading...
  1. Cmd sleep command but with timer - Similar Threads - Cmd sleep command

  2. Monitors will not go to sleep after sleep timer

    in Windows 10 Performance & Maintenance
    Monitors will not go to sleep after sleep timer: Hello,I recently got a new graphics card as well as monitors. Suddenly, my monitors will not go to sleep after the 10 minutes specified in the power settings. I have downloaded the latest drivers for the card, gone through every single advanced power setting, gone through all...
  3. Monitors will not go to sleep after sleep timer

    in Windows 10 Gaming
    Monitors will not go to sleep after sleep timer: Hello,I recently got a new graphics card as well as monitors. Suddenly, my monitors will not go to sleep after the 10 minutes specified in the power settings. I have downloaded the latest drivers for the card, gone through every single advanced power setting, gone through all...
  4. Windows sleep timer issues

    in Windows 10 Performance & Maintenance
    Windows sleep timer issues: My laptop can't sleep automatically when plugged in, but I already set the sleep timer on battery 15 minutes and while plugged in 30 minutes. It only can sleep automatically if on battery but it can't sleep automatically while plugged in. I've already set the timer 30 minutes...
  5. Sleep Timer

    in Windows 10 Performance & Maintenance
    Sleep Timer: I've got an SSD and an HDD in my laptop. Should I set my sleep timer less or more? And how will it affect my HDD and SSD's lifespan? https://answers.microsoft.com/en-us/windows/forum/all/sleep-timer/6b2e56fc-272a-4c53-8c3c-771e47dcaf27
  6. Sleep Timer

    in Windows 10 Gaming
    Sleep Timer: I've got an SSD and an HDD in my laptop. Should I set my sleep timer less or more? And how will it affect my HDD and SSD's lifespan? https://answers.microsoft.com/en-us/windows/forum/all/sleep-timer/6b2e56fc-272a-4c53-8c3c-771e47dcaf27
  7. Sleep Timer

    in Windows 10 Software and Apps
    Sleep Timer: I've got an SSD and an HDD in my laptop. Should I set my sleep timer less or more? And how will it affect my HDD and SSD's lifespan? https://answers.microsoft.com/en-us/windows/forum/all/sleep-timer/6b2e56fc-272a-4c53-8c3c-771e47dcaf27
  8. Sleep Timer Issues

    in Windows 10 Performance & Maintenance
    Sleep Timer Issues: Sometime in the past week or so my pc has been refusing to put itself into sleep mode. I've adjusted every power setting I can think of but it still won't listen to me. If I use the sleep option in the shutdown menu everything works just fine. However, when I step away from...
  9. Sleep with cmd?

    in Windows 10 Performance & Maintenance
    Sleep with cmd?: I want to make a shortcut to sleep, but I dont want to disable hibernation, and I am lost when installing PSTools. Are there any other way? https://answers.microsoft.com/en-us/windows/forum/all/sleep-with-cmd/4114c514-bba6-4918-8425-8812a7ae149e
  10. Disabling sleep / hibernation timer through powershell / cmd

    in Windows 10 Ask Insider
    Disabling sleep / hibernation timer through powershell / cmd: Hi all, I was wondering if anyone knows a way to disable sleep / hibernation through cmd or powershell. I have a system I ssh into at home so I only have a shell but it seems to go into sleep mode after x amount of minutes each time. Any solution? EDIT: a way to reset the...