A known problem with completing Rails Rake tasks on Heroku is that they do not send their logs to Papertrail, since disposable dynodes output their output to the console by default. This is solved by starting your speaker in "disconnect" mode using heroku run:detached rake your:task . Unfortunately, the Heroku scheduler seems to automatically run tasks as normal, and not in disconnected mode, so these logs are lost.
How can you make the scheduler execute the task in detached mode so that these weekly / daily / hourly tasks receive their logs captured by Papertrail as expected?
ruby-on-rails logging heroku rake papertrail-app
Erik trautman
source share