I have a couple background processes that run from anywhere between 2
seconds and 30 seconds that run periodically (some run every 15 minutes,
some every 4 hrs). To run them I call a webpage using curl in a cron
I have a funny feeling this is not the best thing to do :-).
All the tasks I have manipulate the DB. Either re-weighing users or
data from one table to another.
What are the best practices to run these types of periodic tasks?
i encounter situations like this all the time at work. simply take the
code from your action that you are hitting with curl and wrap them in
a rake task. then set up your cron job to do something along the lines