Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Forums > Tutorials

Vista Tutorial - Task Scheduler - Wake Up Computer

Comment
 

Task Scheduler - Wake Up Computer

How to Have a Task Wake up the Computer to Run in Vista Task Scheduler
Published by Brink
07-09-2008

How to Have a Task Wake up the Computer to Run in Vista Task Scheduler

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
  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.
RELATED LINKS:




METHOD ONE:
Create a New Task to Wake Up the Computer to Run
1. For how to create a new task in Task Schedular, see: How to Create a Task in Vista Task Scheduler
NOTE: Be sure to 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.


METHOD TWO:
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
Tip
  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. Click on Continue in the UAC prompt.

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.
Click the image to open in full size.
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.
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.
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.
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
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
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: 25,806
Rep Power: 150
Brink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond repute

Tutorial Tools

Applies to
All Vista Versions
64 Bit & 32 Bit

Old 08-04-2008  
bruce_andrews
Newbie


Join Date: Aug 2008
Vista Home Premium SP 1 64-bit
 
 

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
Old 08-04-2008  
Brink
Administrator


Join Date: Apr 2007
Vista x64 Ultimate SP2, Windows 7 (7600) x64
 
 

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
Old 08-04-2008  
bruce_andrews
Newbie


Join Date: Aug 2008
Vista Home Premium SP 1 64-bit
 
 

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
Old 08-04-2008  
Brink
Administrator


Join Date: Apr 2007
Vista x64 Ultimate SP2, Windows 7 (7600) x64
 
 

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
Old 08-04-2008  
bruce_andrews
Newbie


Join Date: Aug 2008
Vista Home Premium SP 1 64-bit
 
 

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
Old 08-04-2008  
Brink
Administrator


Join Date: Apr 2007
Vista x64 Ultimate SP2, Windows 7 (7600) x64
 
 

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
Old 08-05-2008  
bruce_andrews
Newbie


Join Date: Aug 2008
Vista Home Premium SP 1 64-bit
 
 

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
Comment

Tutorial Tools


Similar Threads
Tutorial Category
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
Task Scheduler on remote computer Vista performance & maintenance


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd
Tutorial powered by GARS 2.1.8m ©2005-2006

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46