Skip to content
Julien Blanchard edited this page Oct 14, 2016 · 1 revision

Tips and Tricks

terminal-notifier and Cron

# CronJobNotifier
# this is a test

/opt/local/bin/terminal-notifier -title cron -subtitle "test" -message "job ready to run" -execute ' 
# start of commands
true &&
false &&
true
# end of commands
if [ $? -ne 0 ] ;
then
    /opt/local/bin/terminal-notifier -title cron -subtitle "test" -message "job failed, run manually" ;
else
    /opt/local/bin/terminal-notifier -title cron -subtitle "test" -message "job run successfully" ;
fi
'
Clone this wiki locally