Task Scheduler Trigger @ Program shutdown

nofare

New member
Local time
12:17 AM
Messages
3
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 Computer

OS
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 Computer

OS
Windows 7
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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Lenovo IdeaCenter 450
OS
Windows 10 Pro X64
CPU
Intel Quad Core i7-4770 @ 3.4Ghz
Memory
16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
Graphics Card(s)
Intel Integrated HD Graphics
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP 22" LCD
Screen Resolution
1680 x 1050
Hard Drives
250GB Samsung EVO SATA-3 SSD
2TB Seagate ST2000DM001 SATA-2
1.5TB Seagate ST3150041AS SATA
Keyboard
Dell USB
Mouse
Lenovo USB
Internet Speed
Cable via Road Runner 3MB Upload, 30MB Download
Antivirus
Windows Defender, MBAM Pro, MBAE
Browser
Seamonkey
Other Info
UEFI/GPT
PLDS DVD-RW DH16AERSH
Will look into this and try it. I don't see why it shouldn't work. Thanks a whole lot.
 

My Computer

OS
Windows 7
Back
Top