3

How can I make a Task in the Windows 7 Task Scheduler with Trigger when an Application Ends ?
I want to make a task when my "explorer.exe" process ends.
How can i make it ?

fixer1234
  • 28,064

3 Answers3

4

I don't see an in-built trigger for this. If the application in question creates its own custom task category and logs events such as app closure then of course you can make use of that, but otherwise I don't think Task Scheduler can help you with this.

A workaround would be to schedule a batch file/script to periodically check which tasks are running (using the tasklist command or similar) and react accordingly.

A program like Shutter can also be useful:

Shutter is a multifunctional scheduling utility, which has a user friendly and easy-to-use interface and supports many different Events and Actions. Events: Countdown, On Time, Winamp Stops, Low CPU Usage, User Inactive, Battery Low, Window Closes, Process Stops, Ping Stops, File Size Limit. Actions: Shutdown, Reboot, Log Off, Lock Workstation, Sleep, Hibernate, Monitor Turn Off, Un/Mute Master Volume, Hang Up, Alarm, Play Sound, Execute Program.

Desktop links can be created to execute any of the supported actions directly from desktop. Web Interface allows remote execution of actions and displays run-time information about the computer: Up Time, List of Processes, Screenshot of a Desktop, Program Execution, and more.

1

Karan
  • 57,289
1

Set up process termination logging. You can then have a scheduled task triggered by these events. The scheduled task can run a powershell script to examine the event and see if the image name is explorer.exe. If it does, then do whatever you want to do.

-1

I know this is old but I found it looking for something similar so in case anyone else finds this, since it doesn't really have an answer

So wouldn't this just be easier to accomplish by setting a scheduled task to run every 5, 10, 30 minutes & have it set to not start a new instance if it's already running? I mean it's not instant, & the task scheduler will be running a check every few minutes, but that's the same thing as any 3rd Party App would be doing but lighter, & requires less resources than creating a log, opening a program to read the log, & essentially searching the log for a specific entry all the time. It's not perfect, but it's better than any of the previous suggestions