0

Is there any Rubygem to send an email or push notification after a certain Rake Task is finished? It's good if there is one as I usually do multi tasking and forget to check if a process of Rake task is finished.

suzukimilanpaak
  • 751
  • 2
  • 8
  • 20

2 Answers2

1

Assuming you're on a Mac, use Growl (http://growl.info/) and the growl gem (https://rubygems.org/gems/growl). You will need to install the growlnotify extra (http://growl.info/extras.php/#growlnotify) to enable growl notifications from the command line--something the gem depends on.

At this point you can add some Ruby in your Rakefile to notify yourself. Example:

notification = Growl.new
notify_ok 'Deployment successful'

Hope that helps.

jboursiquot
  • 1,261
  • 11
  • 8
1

I find that this is easier (ubuntu):

rake whatever_task; notify-send "whatever_task finished with status $?"

On OSX, you'll want to use growlnotify instead of notify-send (I think)

hdgarrood
  • 2,141
  • 16
  • 23