Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Using Task Scheduler to restart a program upon wake from sleep

19 Oct 2013   #1
msalton1

windows 7 Pro 64 Bit
 
 
Using Task Scheduler to restart a program upon wake from sleep

I'm using Logitech's latest LGS for my G700. It's very annoying that I have to exit and restart LGS when my system comes out of sleep or LGS doesn't recognize the mouse as being awake (windows drives it then). This happens when the mouse is running wirelessly. It also happens across versions.

Is there a way to create a task in TS that will exit and restart LSG upon the wake event before or at logon?

Thanks,
Salt


My System SpecsSystem Spec
.
19 Oct 2013   #2
DavidE

Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64
 
 

Here is a trigger (Custom Event Filter) for a scheduled task I have that might help you.
It runs when the PC wakes from sleep or resumes from hibernate.
Here is the source text for the Event Filter XML
Code:
<QueryList>
  <Query Id="0" Path="System">
    <Select Path="System">*[System[Provider[@Name='Microsoft-Windows-Power-Troubleshooter'] and (Level=4 or Level=0) and (EventID=1)]]</Select>
  </Query>
</QueryList>
Using Task Scheduler to restart a program upon wake from sleep-sttsp01.png

You would need to add actions to:
1) kill the task for the running program
2) start the program

Hope this helps,
David


My System SpecsSystem Spec
31 Oct 2013   #3
msalton1

windows 7 Pro 64 Bit
 
 

Hi David. Apologies for somehow missing this. Thanks for your response. I haven't had the chance to give this a try yet, but will, and will post back when I do (given how busy I am these days, it may be awhile .

Thanks again,
Salt
My System SpecsSystem Spec
.

01 Nov 2013   #4
DavidE

Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64
 
 

No problem, work on it whenever you have the time.
fwiw, I've been using this trigger for years, and it works reliably and never caused any problems for me.
My System SpecsSystem Spec
Reply

 Using Task Scheduler to restart a program upon wake from sleep




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Task Scheduler - run program on wake
I simply want to run a program when the computer returns from standby, but I see no options in the scheduler. Help?
General Discussion
Task Scheduler Question - Auto Restart
Hello everyone, I would like to set up a public computer to automatically restart after an hour of use through Windows Task Scheduler. Any help on this matter would be greatly appreciated. Thanks!
General Discussion
Scheduler fails while trying to wake Windows from sleep/hibernation.
Hi there, I am running a Windows 7 64-bit setup, and I'm trying to get a timer to wake Windows from sleep or hibernation. I've got it to work flawlessly on my desktop, however on my laptop, a Dell D630, I can't seem to get it to work. I've created a task triggering on a specific time and...
General Discussion
Using Task Scheduler to wake PC for the day
I put my PC in standby when I go to bed and would like to resume automatically each morning at 5am, the way a WOL packet would do. Can I use Task Scheduler for this? I know I could if I chose to run a specific program, but I just want the PC to wake for the day.
Performance & Maintenance
Task Scheduler doesn't wake up computer
Hi, I noticed somehow my username is logged off if the computer sleeps too long (like during night). If I test the task behind my computer and let the computer sleep for a short while, it automatically awakes. If I allow the computer sleep automatically and for long periods of time, then...
Performance & Maintenance
Wake & Sleep on scheduler
I have a backup program that has its own scheduler. It does not wake the computer to perform the backup until I wake te computer in the morening. It is scheduled at 1:00 AM. Thats the why. Now for the question: Are there any commands I can schedule to wake the computer and stay awake and then...
Performance & Maintenance


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 03:52.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App