Windows Vista Forums

Task Scheduler - Wake Up Computer

  1. #1
    <!-- google_ad_section_start -->Task Scheduler - Wake Up Computer<!-- google_ad_section_end -->

    Task Scheduler - Wake Up Computer
    How to Create a Task to Wake up the Computer to Run in Vista and Windows 7
    Published by Brink is online now
    09 Jul 2008
    Task Scheduler - Wake Up Computer

    How to Create a Task to Wake up the Computer to Run in Vista and Windows 7

    information   Information
    This will show you how to create or modify an existing task in Task Scheduler so it will wake up the computer from a sleep mode and run. This way you can have the task wake up the computer and run automatically for when it is convenient for you instead. For a description of all of the default tasks in Vista, see: Microsoft Help and Support: KB939039
    Tip   Tip
    Sometimes the scheduled task will not wake the computer up even with everything set as it is below. It can sometimes be caused by your administrator account having a password created for it. A workaround is to remove the password for this account. Warning though, removing the password will leave you less secure.





    METHOD ONE

    Create a New Task to Wake Up the Computer to Run

    1. Create a new task in Task Scheduler (click to see tutorial), and check Run with highest privileges in step 10, and At Startup in step 12 in that tutorial link.
    A) Use Option Two below as a guide with the link above for how to set the settings to have the new task wake up the computer to run.
    2. You would need to change how long Vista will wait to go back to sleep mode automatically after waking up unattended (no activity made by the actual user) and idle. The default time is only 120 seconds (2 minutes), so you would need to set this for how long it may take for the program or task to run instead. The tutorial below can help show you how to. It will be the same in Windows 7. For how, see:

    Sleep Return Timeout for Unattended Wake Up - Vista Forums






    METHOD TWO

    To Change an Existing Task to Wake Up the Computer to Run

    NOTE: For more details about any of the settings below and other settings not shown here to change , see: How to Create a Task in Vista Task Scheduler. If you want to stop a task from waking up the computer than uncheck the Wake the computer to run this task box in step 10 below.
    1. Open the Start Menu.
    A) In the white line (Start Search) area, type taskschd.msc and press Enter.

    B) Go to step 3.
    OR

    2. Open the Control Panel (Classic view).
    A) Click on the Administrative Tools Icon.

    B) Click on Task Scheduler.
    3. If prompted by UAC, click on Continue (Vista) or Yes (Windows 7).

    4. In the right pane, click on View and click on Show Hidden Tasks to check it. (See screenshot below step 7)

    5. In the left pane, click on the arrow on the Task Scheduler Library folder, Microsoft folder, and Windows folder to expand them.

    6. Click on the folder for the existing task you wish to change.
    NOTE: For example, the Windows Defender folder, or one that you have created from OPTION ONE above.

    7. In the middle pane, right click on the listed MP Scheduled Scan and click on Properties.
    NOTE: For example, it would be MP Scheduled Scan for Windows Defender.
    8. Under the General tab, check the Run with highest privileges box. (See screenshot below)

    9. Select (dot) Run whether user is logged on or not.
    Task Scheduler - Wake Up Computer-step2.jpg
    10. Click on the Conditions tab and check the Wake the computer to run this task box. (See screenshot below)
    NOTE: For more details on the other options, see the Step Seven section here: How to Create a Task in Vista Task Scheduler
    If you want to stop a task from waking up the computer than uncheck the Wake the computer to run this task box.
    Task Scheduler - Wake Up Computer-step3.jpg
    OPTION ONE:
    Change the Schedule for the Task to Run
    NOTE: This will show how to change when and how often you want the selected task to run. If you do not want to changed this, then proceed to the OPTION TWO section below instead.
    11. Click on the Triggers tab and click on the listed trigger that you wish to change to highlight it. (See screenshot below step 12)

    12. Click on the Edit button.
    Task Scheduler - Wake Up Computer-step4.jpg
    13. Change the schedule to when and how you want the task to run. (See screenshot below)
    NOTE: For more details about these options, see the Step Five section here: How to Create a Task in Vista Task Scheduler
    Task Scheduler - Wake Up Computer-step5.jpg
    14. When done, click on OK. (See screenshot above)
    OPTION TWO:
    How to Set the Task to Attempt to Run Again if it Fails
    NOTE: This will show you how to set the task to automatically attempt to run again if it fails when scheduled and to run automatically the next time you have the computer awake and running if all attempts to run failed. If you do not wish to do this, then proceed to step 18 instead.
    15. Click on the Settings tab. (See screenshot below step)

    16. Check the Run task as soon as possible after a scheduled start is missed box.
    NOTE: This will allow the scheduled task to run the next time you have the computer awake and running if the scan was missed due to it not being able to run at it's scheduled time or failed the attempt to restart in step 17.

    17. Check the If the task fails, restart every box.
    A) Select how often and how many times you want the task to attempt to run again if it failed to run when scheduled for some reason.
    NOTE: For more details on the other options, see the Step Eight section here: How to Create a Task in Vista Task Scheduler
    Task Scheduler - Wake Up Computer-next_time.jpg
    18. Click on OK to apply changes. (See screenshot above)
    NOTE: This will also apply for the window that you are still in if you skipped some of the options above. EX: Screenshot below steps 10, 13, or 17.

    19. Close Task Scheduler. (See screenshot below step 7)
    That's it,
    Shawn




    Published by


    Brink's Avatar
    Administrator

    Join Date: Apr 2007
    Location: Texas, USA
    Posts: 31,256
    Array

    Tutorial Tools


    Applies to

    All Vista Versions
    64 Bit & 32 Bit


  2.   


  3. #1


    Join Date : Aug 2008
    Posts : 5
    Vista Home Premium SP 1 64-bit
    Local Time: 08:53 AM

    Re: Task Scheduler - Wake Up Computer

    That part is fine. My question is:

    How do you keep the computer awake? The default seems to be around 1 minute. That is the scheduler starts the task and then goes back to sleep. If the task takes longer than 1 minute (e. g. defragment or disk backup) the computer goes back to sleep before the task can complete.

    I have not been able to find a way to delay a fixed amount of time for sleep - or more preferable - wait for the task to complete. I think the scheduler is missing an option here.

      My System SpecsSystem Spec

  4.   


  5. #2
    Brink's Avatar

    Administrator


    Join Date : Apr 2007
    Texas, USA
    Posts : 31,256
    64-bit Windows 8.1 Enterprise (RTM)
    Local Time: 10:53 AM
    usa us texas

      Thread Starter

    Re: Task Scheduler - Wake Up Computer

    Hello Bruce, and welcome to Vista Forums.

    You could use this tutorial to set how long the computer will wait to go back to sleep after a unattended wakeup. Set it for how long you believe it will take your task to complete.

    Sleep Return Timeout for Unattended Wake Up

    Hope this helps,
    Shawn

      My System SpecsSystem Spec

  6. #3


    Join Date : Aug 2008
    Posts : 5
    Vista Home Premium SP 1 64-bit
    Local Time: 08:53 AM


     

    Re: Task Scheduler - Wake Up Computer

    Thanks Shawn:

    I looked for an hour thru the registry for these values. Who would think they would title them as 'index's! (I kept looking for 'delay', 'timeout' and such values).

    I did find another posting (after looking for a week!) that there is a power plan setting that 'fixes' this problem. It is for setting the multi-media to 'do not allow the computer to sleep' while sharing media. Again - what a title. It seems to have noting to do with the scheduler - but in fact does keep the computer awake while doing a disk backup.

    Thanks!

      My System SpecsSystem Spec

  7. #4
    Brink's Avatar

    Administrator


    Join Date : Apr 2007
    Texas, USA
    Posts : 31,256
    64-bit Windows 8.1 Enterprise (RTM)
    Local Time: 10:53 AM
    usa us texas

      Thread Starter

    Re: Task Scheduler - Wake Up Computer

    Your welcome Bruce. LOL, they are strange titles that do not relate to their function.

    Thank you for sharing the other results that you found to. Is it the Allow the computer to enter Away Mode or Prevent idling to sleep setting for the multi-media that you used?

    Thank you,
    Shawn

      My System SpecsSystem Spec

  8. #5


    Join Date : Aug 2008
    Posts : 5
    Vista Home Premium SP 1 64-bit
    Local Time: 08:53 AM


     

    Re: Task Scheduler - Wake Up Computer

    Prevent idling to sleep. Of course my computer will not now go to sleep if I walk away from it. (Haven't tried forcing sleep yet - just found this a half day ago)

    There has to be a better overall way (like having the scheduler 'fixed'.)

      My System SpecsSystem Spec

  9. #6
    Brink's Avatar

    Administrator


    Join Date : Apr 2007
    Texas, USA
    Posts : 31,256
    64-bit Windows 8.1 Enterprise (RTM)
    Local Time: 10:53 AM
    usa us texas

      Thread Starter

    Re: Task Scheduler - Wake Up Computer

    It should go to sleep if you manually do it with that setting.

    I agree, there should be a easier to use option in Task Scheduler for this. For now the only workarounds I know of is your method, or adjusting the unattended wakeup time to allow time for the task.

      My System SpecsSystem Spec

  10. #7


    Join Date : Aug 2008
    Posts : 5
    Vista Home Premium SP 1 64-bit
    Local Time: 08:53 AM


     

    Re: Task Scheduler - Wake Up Computer

    Another voice on the subject.

    I wrote a comment on a Microsoft documentation site about this problem. The reply is below:
    ---------------------
    Thanks for the background information. You might also want to try setting the priority of the task. I don't think this can be done through the Task Scheduler UI, but if you modify the xml for the task (probably the easiest option), or if you create it programmatically, then you can set the priority (http://msdn.microsoft.com/en-us/library/aa381855(VS.85).aspx). I haven't tried this myself, but by setting the priority to something like 4 (an interactive task), then my hope would be that the running task process would keep the computer from sleeping.

    If you want to modify the task XML to set the priority, first export the task to an xml file, and then in the XML under the <Settings> element, you can specify a <Priority> element with a value.
    Let me know if you need any help with changing the priority and I can help provide an example.

    Chris
    ----------------------------------------

    This, of course, does not SOLVE the overall problem - just (possibly) another way.

      My System SpecsSystem Spec


Task Scheduler - Wake Up Computer
Similar Threads
Tutorial Category
Wake Computer to Run Task Turns Off Vista General
Task Scheduler Question-Wake Up Computer Vista General
Task scheduler doesn't wake computer Vista file management
Schedule a task with Vista task Scheduler wakes up computer and mo Vista General
Defragment as task, wake computer from sleep. Vista performance & maintenance