[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: email notification when a process ends?



Zhengquan Zhang:
> On Wed, Apr 15, 2009 at 08:16:23PM +0000, Pedro Insua wrote:
>
>>   echo "End" | mail -s "subject text" user
> 
> THank you very much, but now the problem is that the process has already
> started and how can I detect its end time?

In another shell:

while ps -ef | grep $processname; do sleep 60; done && echo "done" | \
mail -s "subject" user

But it might be tricky to identify the right process.

J.
-- 
My memories gild my life with rare transcendance.
[Agree]   [Disagree]
                 <http://www.slowlydownward.com/NODATA/data_enter2.html>

Attachment: signature.asc
Description: Digital signature


Reply to: