Simple utility for running jobs with email notification on completion.
- Download the script into some directory (e.g.
$HOME/scripts
) and give yourself exec permissions. - Copy the following to your
~/.bashrc
and edit the variables in []
# notify-run
export PATH=$PATH:[PATH_TO_SCRIPT_DIRECTORY]
export NR_EMAIL=[YOUR_EMAIL]
# By default, notify-run will use $HOME/notify-run as a base directory for logfiles and job tables.
# Uncomment the following to change that.
# NR_BASEDIR=[BASE_DIR]
- In terminal run
source ~/.bashrc
notify-run [options] COMMAND...
Run COMMAND in the background, logging to a logfile generated using the timestamp and a job name.
When done, send an email to the address in $NR_EMAIL.
Options:
-E omit email notification
-f N show last N jobs finished
-h show help text
-l show running jobs
-n name give your job a name
-r read logfile for most recently started job using less
-s N show last N jobs started