Search code examples
rubyherokuscheduler

How to run simple ruby script (not RoR app) on heroku?


I wonder about how can I run simple script on Heroku? Until now I have been working only with RoR app which I hosted on Heroku, but I never run there one simple script.

I would need just run simple ruby script which would be run by Scheduler. How could I do that?


Solution

  • Use rake and the scheduler addon from Heroku.
    Here is a comprehensive guide in the heroku docs.
    https://devcenter.heroku.com/articles/scheduler
    Baiscally you create a rake task and select when to run it. It is quite simple.