Windows 7 Forums Search
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows 7. The Windows 7 forum also covers news and updates and has an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7 - Task Scheduler Trigger @ Program shutdown

 
04-09-2010   #1


Windows 7
 
 

Task Scheduler Trigger @ Program shutdown

Hello,

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
04-09-2010   #2


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


See this thread.

Run program on shutdown
My System SpecsSystem Spec
08-25-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
.


08-26-2010   #4


 
 


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
08-27-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
Reply

 Task Scheduler Trigger @ Program shutdown problems?



Thread Tools



Similar Threads for: Task Scheduler Trigger @ Program shutdown
Thread Forum
Function of time field in New Trigger window Task Scheduler? Customization
Solved Task Scheduler: Automatic Backup/Shutdown Backup and Restore
Help with using idle trigger in Win Task Scheduler Performance & Maintenance
task scheduler (update>defrag>v-scan>shutdown/S3) General Discussion
Task Scheduler recognizes only first trigger Performance & Maintenance


All times are GMT -5. The time now is 09:44 PM.



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
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30