Batch program for running process

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
battula.mani
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.

Eg:

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 .
Attachments
process.png
process.png (14.54 KiB) Viewed 2137 times

penpen
Expert
Posts: 1996
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:
https://www.ultimatewindowssecurity.com ... entID=4689.


penpen

Post Reply