Won't stay awake for task

  • Thread starter Thread starter MikeM
  • Start date Start date
M

MikeM

I can schedule a task to awaken the computer. The computer comes out of sleep
for a few seconds, starts the task, then promptly goes back to sleep.

Is there a way to keep it awake long enough to complete the task?

One of the problem tasks is running the Norton Anti Virus scans. When I
awaken my computer in the morning, I find that NAV has been started, but only
scans a few files before the computer went back to sleep. It then wants to
complete the scan when the computer is awake.

Perhaps there is a command that can be added to the task that turns off the
ability to enter sleep before running the program then turns it back on when
the program completes.
 
schedule a *.bat file to run the scan after a change to your sleep settings
--scheduled.bat--
REM change sleep setting to 60 minutes
powercfg -Change standby-timeout-ac 60
REM start Nav scan
c:/somefolder/somefile.exe
--end file--

Run a bat file on startup
--startup.bat--
REM reset sleep timer to 5 minutes
powercfg -Change standby-timeout-ac 5
--end file--
--
Was this helpful? Then click the Ratings button. Voting helps the web
interface.
http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
Mark L. Ferguson
..
 
http://www.personal.psu.edu/mjw12/public/StayAwake.pdf

This has solved a couple of my problems with Vista going to sleep after the task scheduler woke to run. I believe the Vista default sleep is 120 seconds when brought out of sleep my the task scheduler. This is not controlled by the normal power options sleep timer. There are some registry hacks to change the timer but I found using the StayAwake front launcher to be an easier, cleaner solution.

gt57



Posted as a reply to:

Won't stay awake for task

I can schedule a task to awaken the computer. The computer comes out of sleep
for a few seconds, starts the task, then promptly goes back to sleep

Is there a way to keep it awake long enough to complete the task

One of the problem tasks is running the Norton Anti Virus scans. When I
awaken my computer in the morning, I find that NAV has been started, but only
scans a few files before the computer went back to sleep. It then wants to
complete the scan when the computer is awake

Perhaps there is a command that can be added to the task that turns off the
ability to enter sleep before running the program then turns it back on when
the program completes.

EggHeadCafe - Software Developer Portal of Choice
WCF Workflow Services Using External Data Exchange
http://www.eggheadcafe.com/tutorial...a-6dafb17b6d74/wcf-workflow-services-usi.aspx
 
Back
Top