Scheduler wakes, doesn't wait for task to end, then goes bac
Posted by admin on Mar 23rd, 2007
I have a task to run an executable. I have it set to run whether the user is logged in or not, run with the highest privileges, wake the computer to run this task, stop the task if it runs longer than 8 hours. It runs at 1am. The task wakes the computer up at 1am fine, starts the executable, then puts the computer back to sleep without waiting for the executable (a VS2005 SP1 C# program I created) to complete. When I wake the computer in the morning, the executable resumes.What is up with this? Why can't the task scheduler wait until the task it spawned finishes? My vista installation was an upgrade from XP Pro. But I created the task (several times) from scratch in Vista. I also recompiled the executable in Vista.I have also tried the task in both "Windows Server 2003, Windows XP, or Windows 2000" mode and in "Windows Vista" mode.This is a huuuuuge step backward for me. I would appreciate any help anyone can offer for this.
Mar 24th, 2007 at 03:46 pm
On Sat, 17 Mar 2007 07:10:10 0700, Pete Furtado <Pete Furtado@discussions.microsoft.com> wrote: Is the PC set to "suspend" after some time of inactivity?If so, turn that off as that may cut in just because there's no keyboard or mouse activity going on.Are there any settings within the Task's properties to control this sort of behavior? Be easier to use! >
Mar 29th, 2007 at 03:23 pm
Thanks for the reply.It is set to go into standby after 2 hours. But it seems to go right back to sleep after spawning the task. My executable writes informational messages to the event log and I see it writing messages for about 30 seconds to a minute, then nothing. I'm assuming that is when the machine goes back into standby.I will doublecheck this tonight, though, and change the power scheme to just leave the machine on all night and see what happens.I can't find any other settings in the task's properties other than what I stated in my original post. If there's some "hidden" ones, I'm dying to find out. I'll update this thread tomorrow with the results.Thanks again."cquirke (MVP Windows shell/user)" wrote:
Apr 1st, 2007 at 12:02 am
Hi Pete,Did you find a sollution to this? I'm having the same problem, although only with a batch file which backs up some files. It normally takes around 15 to 20 minutes to run, but I can see from the event log that although the Vista machine wakes up fine, it goes back into standby after about 7 or 8 minutes. My power settings tell the PC to go into standby after 1 hour.I can't see a "keep machine awake while running task" option in the task scheduler, which is exactly what I want.A.
Apr 3rd, 2007 at 05:40 pm
STILL NO LUCK!!!!This is just unbelievable to me! You would think that with all the talk about power saving and global warming, the LEAST that Microsoft could do would be to make a task scheduler that actually allows you to leave your computer in standby mode and only wake up to run a job or two and then go back to sleep. They had it right in XP pro, before I upgraded my machine to Visita this stuff worked flawlessly in XP Pro.Unless I find an answer to this, I won't be upgrading my Media Center 2005 box to Vista, because I have that box in standby 20 hours a day and waking up and recording, etc.Okay, now that my ranting is done, I just say that if I find anything out, I'll post it here. And if anyone has an answer to this, please let us know!Thanks. Pete"Adam" wrote:
Apr 4th, 2007 at 11:17 am
Humm... It's certainly annoying.I haven't been able to find out anything about it, dispite spending several hours on Google. All I've found so far istechnet.microsoft.com/enus/windowsvista/aa906020.aspxWhich says "Task Scheduler wakes the machine to run the tasks and allows it to return to standby or hibernation when the task is complete, saving energy while still ensuring that critical tasks run on time."And our systems obviosuly aren't working like that They're returning to standby mode before the task completes.I'll keep looking, and will post back here if I find anything.A. "Pete Furtado"
Apr 7th, 2007 at 05:14 pm
"Adds" I think I might have found away around this, although not ideal.In my batch file, I'm running powercfg first to set the PC into "High Performance" mode (powercfg /? will give the options). I then set it back to my normal power mode after the batch file has complete.I have to admit that I haven't given it long enough to test properly, but it appears to work.Not ideal I know, but at least it might be a work around.A.
Apr 11th, 2007 at 12:25 pm
"Adds" wrote: Interesting idea. I got so disgusted with this problem that I gave up for a while. Anyway, how has it worked for you? I will try this myself in the next couple of days. Thanks! Pete