I have a rails app hosted on Heroku which needs a regular task to run
every
30 mintues. The task takes 5 minutes to complete
Previously I was using the gem resque and resque-scheduler for this. The
problem however is that this requires 2 additional dynos, one for the
scheduler and one for the worker task to run on.
Is there any way to achieve this just by using one dyno instead of two?
Thanks in advance!
On Wed, Dec 3, 2014 at 3:24 PM, Ganesh Ranganathan < [email protected]> wrote:
ᐧ
Previously I was using the gem resque and resque-scheduler for this. The
problem however is that this requires 2 additional dynos, one for the
scheduler and one for the worker task to run on.
You could use the sucker punch gem which does the background processing
along with the rails process, so there shouldn’t be the need to start
another dyno. Not sure about if we can schedule it to start at a
particular
point of time.
On Wed, Dec 3, 2014 at 3:34 PM, Harisankar P S [email protected] wrote:
You could use the sucker punch gem which does the background processing
along with the rails process, so there shouldn’t be the need to start
another dyno. Not sure about if we can schedule it to start at a particular
point of time.
Thanks…this seems to be a suitable gem for my purpose. The resque /
resque-scheduler was overkill since it was costing $70 a month just to
run
simple scheduled tasks .
I am not sure conventional cron jobs can be made to work on heroku.
There
is no persistent file storage so even if the crontab file is edited, it
wont reflect on any other dyno.
On Wed, Dec 3, 2014 at 3:50 PM, Ganesh Ranganathan < [email protected]> wrote:
ᐧ
I am not sure conventional cron jobs can be made to work on heroku. There
is no persistent file storage so even if the crontab file is edited, it
wont reflect on any other dyno.
Thats true, I did a google on running cron job in heroku it seems there
is
an addon called heroku scheduler[1] which would works like cron. But its
run hours would cost as as your regular dyno run hours so it wouldn’t be
a
cost efficient substitute.
On Wed, Dec 3, 2014 at 5:39 PM, Harisankar P S [email protected] wrote:
Thats true, I did a google on running cron job in heroku it seems there is
an addon called heroku scheduler[1] which would works like cron. But its
run hours would cost as as your regular dyno run hours so it wouldn’t be a
cost efficient substitute.
Ya it’s wasteful to run a scheduler on it’s own dyno all the time just
to
schedule 1/2 tasks.
The sucker punch gem seems a good idea. I’ll try it tonight…
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.