Rails: run a script reader (1h) every day. Suggestions?

I am developing a website in Rails that will run the script once a day. The script reads the xml feeds and updates the database. I am using Rails 3.1.1 and running a website on Heroku.

What options do I have here so that the script doesn't completely kill the website when it starts? Adding dyno, I think, will solve it, but it will be quite expensive, especially since it is not really needed externally when I run the script.

Can I run the script in another database and copy it? Run it in the background? In short, what are my options?

Edit: I did not quite understand here. My problem here is to have as little effect on the web server / database as possible, and not on running the script (each, etc.). I plan to run the script overnight to affect as little as possible, but still I do not want the site to be completely down during this hour.

+1
source share
3 answers

In general, it depends on the performance characteristics of your script. If this is a very intensive processor, but otherwise it affects badly, I would not worry: when using something like a hero scheduler, the task starts in a separate dynamic mode. Since this is a separate dinosaur, it will not affect your other speakers that serve the requests.

- . -, , .., ( , , , , ), .

- - , /, , - , .

db , , , : / , , , , , db, , , .

, , , - ( , a follower). , , , ( ). , , db, , .

, , . - ( ), . (, mongo, redis) , . , , , , .

- , , - . , , ( , ).

+2

feedzirra . , .

whenever gem. , , .

, - , . - .

+1
+1
source