Background processing in rails
Posted
by hashpipe
on Stack Overflow
See other posts from Stack Overflow
or by hashpipe
Published on 2010-04-12T15:44:37Z
Indexed on
2010/04/13
8:53 UTC
Read the original article
Hit count: 518
Hi,
This might seem like a FAQ on stackoverflow, but my requirements are a little different. While I have previously used BackgroundRB and DJ for running background processes in ruby, my requirement this time is to run some heavy analytics and mathematical computations on a huge set of data, and I need to do this only about the first 15 days of the month. Going by this, I am tempted to use cron and run a ruby script to accomplish this goal.
What I would like to know / understand is: 1 - Is using cron a good idea (cause I'm not a system admin, and so while I have basic idea of cron, I'm not overly confident of doing it perfectly) 2 - Can we somehow modify DJ to run only on the first 15 days of the month (with / without using cron), and then just stop and exit once all the jobs in the queue for the day are over (don't want it to ping the DB every time for a new job...whatever the jobs will be in the queue when DJ starts, that will be all).
I'm not sure if I have put the question in the right manner, but any help in this direction will be much appreciated.
Thanks
© Stack Overflow or respective owner