Batch program for running process

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Posts: 1
Joined: 07 Mar 2019 08:16

Batch program for running process

#1 Post by battula.mani » 07 Mar 2019 08:27

Hi All,

we are several applicaitons are running on windows machine,
we are planning for automation,if any process are not running or if any one closed the running application and it should trigger the email notification.


T01 is the bat file and it is continuously running 24/7 on windows machine, If any close this bat file and automatically trigger the email notification.

Please find the attached windows task manager application program.

can any please provide the solution how to write the batch program for this .
process.png (14.54 KiB) Viewed 252 times

Posts: 1669
Joined: 23 Jun 2013 06:15
Location: Germany

Re: Batch program for running process

#2 Post by penpen » 09 Mar 2019 03:28

I'm not sure what you exactly want to achieve.

If you only want to send an email, whenever your batch ends "on its own", then just make sure the last command in your batch sends an email (using third party or vbs/js/powershell/... script - just search this forum for the words "send email" without the doublequotes).

If you wnat to secure your batch files against an external cause that ends your program (for example someone terminates your batch using the task manager), then you can't do that with a parallel running batch, because that might have terminated first.
So in that case you have to use the Windows Task Scheduler (which is not a windows batch issue). I would recommend you to trigger running a batch file that sends an email (using third party or vbs/js/powershell/... script ...) whenever a program terminates, see: ... entID=4689.


Post Reply