Running a task every 10 minutes, every hour or daily in heroku.com using scheduler add-on

Running a task every 10 minutes, every hour or daily in heroku.com using scheduler add-on

If you are hosting your application on heroku.com and you want to run a task from time to time you can use the add-on scheduler which is free!! but how you can use it?, is it pretty straightforward just do the following:

from console inside your project folder application you have to run:

heroku addons:add scheduler


And the from console you can specify the task or easier from your heroku dashboard, just clic on:

heroku scheduler

heroku scheduler

and also you have to specify the task you want to run in my case I’ll run a task in order to regenerate the sitemap daily.

sitemap task

sitemap task

And that’s it if you don’t know about how to create custom rake tasks you can take a look into my post where I put a rake task example:
https://blog.elh.mx/ruby/creating-a-rake-task-for-rails-or-spree/

No Comments

Post A Comment