Poor Man's Notification System

April 21, 2010

This is the easiest way to have a long running script, running in a screen session notify you when it finishes (or when it totally craps out.)


$ ./long-running-script.rb; \
  echo "Oh crap! Your long running script isn't running" | \
  mail -s "Your thing died" sam@drasticcode.com

Run it as a one-liner and stop compulsively checking on it.

If you don’t have a mail command you can install mailutils on Ubuntu.


$ sudo apt-get install mailutils