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: Task Scheduler Trigger @ Program shutdown

09 Apr 2010   #1

Windows 7
Task Scheduler Trigger @ Program shutdown


I would like a particular Task to run each time the Firefox application is closed, or, perhaps easier, each time my computer shutdowns.

But I have no idea how to set up such Trigger.

Have any of you an idea on how I should proceed?

Thanks for the help.

My System SpecsSystem Spec
09 Apr 2010   #2

Windows 7 x64 pro/ Windows 7 x86 Pro/ XP SP3 x86

See this thread.

Run program on shutdown
My System SpecsSystem Spec
25 Aug 2010   #3

Windows 7

Thanks for the reply.

After some test, I realize that I'd rather have the process I'm interested in running start after I quit Firefox. In other words, Firefox shutting down needs to be the trigger that automatically starts the process I'd like to implement.

Any ideas on the steps I would need to take to make my quitting Firefox the trigger to another program starting? Or have I misread the thread you directed me above?

Thanks for your help.
My System SpecsSystem Spec
26 Aug 2010   #4

Windows 8 Core X64

I can't find anything but if you can write a small program (may be some available for free from internet) that can monitor a specific process, then you could have this program start whenever you start FireFox by starting a batch file that would first start the monitoring program, then start FireFox. When the program detects FF goes away it could run another batch file which would do whatever you want.

More ideas here: Batch file to check process - Windows

This works, just tried it:

To check if a process is running, you can use the tasklist command. To check if firefox is running, I would use the following command:

tasklist /FI "IMAGENAME eq firefox.exe" /NH

which will return (note: extra whitespace is not shown by whirlpool):

firefox.exe 2660 Console 0 155,476 K

If a process is not running it will return something like this:

INFO: No tasks running with the specified criteria.

If you use this together with a for statement, you could check if the first returned word is the process name (e.g. firefox.exe) or INFO:. I hope that helps a bit. I'll leave the exact syntax for the for statement up to you...
My System SpecsSystem Spec
27 Aug 2010   #5

Windows 7

Will look into this and try it. I don't see why it shouldn't work. Thanks a whole lot.
My System SpecsSystem Spec

 Task Scheduler Trigger @ Program shutdown

Thread Tools

Similar help and support threads for2: Task Scheduler Trigger @ Program shutdown
Thread Forum
Task Scheduler recognizes only first trigger Performance & Maintenance
task scheduler worked one time Shutdown General Discussion
How to trigger 'task scheduler' on new wifi connection? Network & Sharing
Solved Task scheduler: trigger on screensaver event possible? Performance & Maintenance
Solved Task Scheduler: Automatic Backup/Shutdown Backup and Restore
Help with using idle trigger in Win Task Scheduler 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 12:42 AM.
Twitter Facebook Google+

Windows 7 Forums

Seven Forums Android App Seven Forums IOS App