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 10 Pro 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
Thread Forum
Task scheduler: trigger on screensaver event possible?
I got task scheduler to run a sync utility when the (on idle) trigger occurs. However, it would trigger while I am watching a full screen movie or video and exit out. Is there anyway to fix this? If not, I noticed my screen saver doesn't get initialize while watching a movie or video in full...
Performance & Maintenance
Is there a trigger for a task schedule to shutdown
I want to ensure that when I shutdown certain critical files have been copied to an alternate location. I have viewed a great number of tips and tutorials which show how to create a shutdown task. eg...
Performance & Maintenance
Task Scheduler recognizes only first trigger
Hi, the problem is if I create a new task for the task scheduler which is having multiple triggers, only the first entered trigger is recogized and used. E.g., I have two weekly triggers to execute a program. The first selects Mon, Tue, Wed, Thu, and Fri to run the program. The second...
Performance & Maintenance
How to trigger 'task scheduler' on new wifi connection?
Hey everyone, Searched everywhere, and really striking out on how to do this (if it's even possible). I'd like to use Task Scheduler (or some other program) to automatically perform a task when my Android phone connects to my home wifi network (my PC is plugged into this router). Is there a...
Network & Sharing
Help with using idle trigger in Win Task Scheduler
OK I know i've bombarded the forums lately with a couple threads all somewhat related. Point of this thread -- how to correctly set the idle trigger in windows task scheduler. There is a MSFT article Task Idle Conditions (Windows) which tries to explain it, but I can't figure it out. I...
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 16:12.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App