Re: how to send email once process finishes



bahoo staggered into the Black Sun and said:
Hi, I'd like to send myself an email once a particular process ends.
I know the PID, and it usually runs for several hours, so I'd like to
know when it finishes. Is it possible to write a script to do that?

# PID=whatever pid you want to watch
while [ -e /proc/$PID ] ; do
sleep 30 # change to 15 or 60 or whatever
done
echo "Process done" | mail -s "process finished" someone@xxxxxxxxxxx

# there are multiple ways to do this; this is one way. This doesn't do
# any error handling or check the process's return status. It might
# fail miserably if the machine's being used by tons of people. HTH,

--
One suspects that with one side demanding DRM and the other side
demanding it not get in the way of enjoying the purchase, friable DRM is
the technical solution that makes everyone happy. --AdB, in ASR
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
.



Relevant Pages

  • Re: PID and MSDNAA
    ... I am really impressed that the MSDNAA includes the XPe tools. ... > I am using the full version and I do see the PID field on TD. ... > "The Rob" ... >> the PID from the license sticker (which you purchase from a reseller). ...
    (microsoft.public.windowsxp.embedded)
  • La Marzocco Fuji PID Settings
    ... that if you purchase a PID kit from them they will include a "set of ... parameters to place into the Fuji PID unit for best results when used ... on La Marzocco espresso machines." ... I currently have a Fuji PID attached to my La Marzocco and I am ...
    (alt.coffee)
  • Re: La Marzocco Fuji PID Settings
    ... PID Fuji Marzocco Scace ... that if you purchase a PID kit from them they will include a "set of ...
    (alt.coffee)
  • Re: PID related
    ... You don't need to change the PID or your Image. ... You can leave the "old" batch PID in. ... that we purchase from Microsoft. ... additional PIDs as per the production policy of the company (depends on ...
    (microsoft.public.windowsxp.embedded)
  • Re: Evaluation copy displayed on XPE desktop
    ... The resolution to this problem was the run-time PID, ... Though TD did not warn that the image was evaluation and would expire ... "John in FL" wrote: ... I am working to track the purchase now and see ...
    (microsoft.public.windowsxp.embedded)