Triggering and Monitoring Rake task from ruby app

I have a requirement to run a ad hoc rake tasks on a server or to run rake tasks that are present in tasks directory of rails app.

How can I run rake task and capture the output of that task for verification. Some of these tasks might run for few hours. In this case how can I monitor the status of that task?

Iā€™m not sure this is related or not.
But maybe you can try this.
Whenever gem.

1 Like