Ideas For Handling Rake Task Errors

I am looking for some ideas on how I can create some way of error
alerts for failed rake tasks and how some of you are handling
something like this. Basically if a rake tasks fails I would like to
have some kind of alert by email that the task did not complete. Are
there any services that your using to do something like this?
Currently
I am running these tasks via cron.

Thank You

Hello,

On Friday, May 18, 2012 2:24:19 AM UTC-3, gerbdla wrote:

I am looking for some ideas on how I can create some way of error
alerts for failed rake tasks and how some of you are handling
something like this. Basically if a rake tasks fails I would like to
have some kind of alert by email that the task did not complete. Are
there any services that your using to do something like this?
Currently
I am running these tasks via cron.

For that to work you will need to provide “standard_exception_handling”
method that and extend Rake.application

The following Gist is what I used with one application to send errors to
Exceptional.io:

You could replace the exceptional.io handling and go whatever you want.

Hope that helps

Luis L.

On Thu, May 17, 2012 at 10:24 PM, gerbdla [email protected] wrote:

I am looking for some ideas on how I can create some way of error
alerts for failed rake tasks and how some of you are handling
something like this. Basically if a rake tasks fails I would like to
have some kind of alert by email that the task did not complete. Are
there any services that your using to do something like this?
Currently
I am running these tasks via cron.

Reading the cron(8) man page –

"… When executing commands, any output is mailed to the owner
of the crontab (or to the user named in the MAILTO environment
variable in the crontab, if such exists).

As long as what you’re doing dumps errors to stdout or stderr, you
should receive an email about it :slight_smile:


Hassan S. ------------------------ [email protected]

twitter: @hassan