Olivier Rosset
Olivier Rosset

Reputation: 153

Get notified with exception_notification of exceptions raised during a cron job

We have several cron jobs scheduled with the help of the whenever gem using the following syntax in schedule.rb:

runner "Task.do_something_great". Please note that they are not run through the rake command but using runner.

We also use the exception_notification gem to send us an email when an exception is raised in the application which works great.

Since exception_notification is a rack middleware and works only with web requests we also implemented this solution https://stackoverflow.com/a/10806863/1693764 to notify us of exceptions occurred during rake tasks.

Now, is there any way to be notified by exception_notification when an exception occurs during the execution of a runner?

Upvotes: 5

Views: 327

Answers (0)

Related Questions