Scheduling Rails Tasks on Heroku + localhost

Is there a gem / app / add-on scheduler that works on both Heroku and my local machine? I just need to do a separate task on a daily basis, so I don't think I need anything too complicated.

I looked at the Geroku scheduler, but it looks like nothing like this is comparable locally. Whenever the gem has nothing comparable on Heroku ( "Whenever the gem runs cron jobs on Heroku .) I've also looked at Resque / Resque Scheduler / Redis, but that really seems like overkill for what I want to do.

Am I missing something really basic here?

+3


source to share


3 answers


If you are using the Heroku scheduler on Heroku, you can simply use your local crontab (assuming you are using OSX / Linux) to run it locally. The whole Geroku planner performs the rake task at a given time, there is nothing difficult about it.



+3


source


rufus-scheduler runs both locally and remotely on Heroku, ... with some limitations:

1) Long Term Job Will Terminate: Scheduled Jobs are designed to run short running tasks or run longer running tasks in the background job queue, such as Delayed Job . Anything that takes longer than a couple of minutes to complete must use a workflow to start (see hero scheduler add-on )



2), you have to be careful about memory consumption. Each process has a 512MB memory limit, after which it starts paging for swap and performance degrades. If all your streams are concatenated, use less than 512MB of memory, then this may work.

+2


source


I am using the scheduler on heroku and everything is working fine. If you want the same setup locally, you can simply create a cron task that simply runs the rake command on the same iteration.

0


source







All Articles