Daily Routine

Hi guys,
I was wondering if sb could guide me.
I want to create a thread that was started with rails server start up.
This
Thread does some database update every day (automatically).
Sb knows where can I find some materials about it?
Thx

Bruno M.

On 30 December 2011 13:59, Bruno M. [email protected] wrote:

Hi guys,
I was wondering if sb could guide me.

“sb” ?

I want to create a thread that was started with rails server start up. This
Thread does some database update every day (automatically).
Sb knows where can I find some materials about it?

It would be impossible to suggest anything without knowing more about
your environment (at least, which OS).
For instance, you might achieve what you want with cron, or scheduled
tasks.

sb = somebody (Sorry, English is not my native language ;/ )
Well, I’m using Debian.
I want to run this task at the end of the day(This day could be given by
the time in my server). This task will do some updates in my database.

On 30 December 2011 14:11, Bruno M. [email protected] wrote:

Well, I’m using Debian.
I want to run this task at the end of the day(This day could be given by the
time in my server). This task will do some updates in my database.

I would use cron to run a script.

Michael,
It seems that this RailsCron gem is what I’ve been looking for. :smiley:
I will take a look in it.
Thx
:smiley:

On 30 December 2011 14:26, Bruno M. [email protected] wrote:

Michael,
It seems that this RailsCron gem is what I’ve been looking for. :smiley:
I will take a look in it.

Really? If you insist. But it seems like overkill to add scheduling to
your application for the requirement you described. But that’s a
decision that only you can make.

TTFN

I will try using this gem, If it not works properly or overload my
application I will try using another approach.
Thx a lot, Before your answers I didn’t know how could I start doing
this
activity.
:smiley:

That way the crons can also be maintained when you use capistrano and
they will be deployed to new machines if needed. It makes a great deal
of sense to bundle the application specific crons with he application
itself.

You also might want to have a look at the Whenever gem it provides neat
syntax all done with ruby and integrates well with capistrano.

Hope this helps!

2011/12/30 Peter H. [email protected]

Hmmm
Thx… I will take a look in this whenever. It’s seems easy to use. :smiley:

+1 to “whenever” gem for the exact reasons benjamin points out.

Gautam P.

On Sat, Dec 31, 2011 at 12:45 AM, Benjamin Iandavid R. <

Also, check out whenever

On Fri, Dec 30, 2011 at 10:55 AM, Peter H.