Friday, December 30, 2016

Simple script to send email once job finishes

If you have a unix process running then this script can be used to send an email when it is done.
First find th epid of the process

(while kill -0 ; do sleep 1; done) && (echo 'Process Finished now' | mail -s 'job done' Email@recipient.com