Our purpose is finding old process then kill them. Now I will explain below script.Mainly we have for loop and our variables are process names(that we want to kill).

Then in for loop we define the process life duration. After that we are checking there is any process that we defined. Then if exist, we will kill them then sending e-mail to admins.

You can use SendEmail app for sending your alerts. You can find it below link.

sendEmail-v1.56.tar