Run the Rails Rake task on Heroku Scheduler as a separate log entry in Papertrail

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?

+7
ruby-on-rails logging heroku rake papertrail-app
source share

No one has answered this question yet.

See related questions:

366
How to run Rake tasks from Rake tasks?
14
Heroku planner does not create a log
6
Rails: how to write to a user log file due to a rake task in production mode?
6
How to stop Heroku Dyno, which runs a Rails task using Heroku Scheduler?
4
Heroku, DJ, rake registration
3
Heroku scheduler is added, and console rails / rake tasks no longer work
2
Rail tasks and rail initializers
one
Why does this raking task not work in Heroku?
0
Rails, Heroku, Planner and Mailgun: Mail is not sent
0
Rake task not sending mail rails

All Articles