Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku scheduler: Sending email upon Rake task failure

I'm running Rake tasks on Heroku with the scheduler add-on, as part of a Rails app. Is there an easy way to get notification emails if a task fails (i.e., raises an exception)? Ideally the email would include the stack trace and also any output generated up to that point by the task.

like image 632
Nik Haldimann Avatar asked Oct 21 '22 19:10

Nik Haldimann


1 Answers

I ended up fixing my issue more comprehensively by writing an extension to exception_notification for Rake tasks, called notification_exception-rake. I also wrote a blog post specifically about how to use it on Heroku.

like image 196
Nik Haldimann Avatar answered Oct 31 '22 15:10

Nik Haldimann