Topic: [scheduling task] What's the best rails way ?

Hi everyone smile

I would like to know what is the best rails way for scheduling tasks ?

I searched the web and this forum and found some solutions. Of course for all Unix systems using CRON + Whenever seems to be the best practice. But this is only working on Unix systems and I'm searching for a "whatever system solution".

So far I found those gems:

- Rufus-scheduler seems great
- ClockWork but I didn't understand how it works
- BackgrounDrb which seems to be no longer updated.

So I'd like to know how the great community of Rails Forum deals with scheduled tasks.

What is the best rails way to manage scheduled tasks? What gems do you use? How do you schedule tasks? Does any tutorial exists for scheduling tasks?

I hope this post will help many of future rails developers who want to schedule Rails tasks.

Thanks to anyone who'll answer smile

Kulgar.

Last edited by Kulgar (2011-09-06 04:57:18)

Re: [scheduling task] What's the best rails way ?

Anyone ?

I'm sure some of you have already scheduled tasks for a Rails application.

Re: [scheduling task] What's the best rails way ?

take a look here

http://railscasts.com/episodes?utf8=%E2 … earch=task

Re: [scheduling task] What's the best rails way ?

Thanks a lot ! That should fill my needs smile

Sorry I did not answer earlier...

I'll add an answer latter to explain what solution I finally used.

Re: [scheduling task] What's the best rails way ?

As it has been already told:

for rufus scheduler; http://rufus.rubyforge.org/rufus-scheduler/, see included examples
there is also Cron: http://railscasts.com/episodes/164-cron-in-ruby

Re: [scheduling task] What's the best rails way ?

I know it's been a while I posted this message, but I remembered recently that I'd say what solution I've finally followed.

So I'm using Clockwork as its repository on GitHub has some info about how to implement it with DelayedJob which I'm also using.

But, rufus-scheduler and Clockwork seem to be both good enough for scheduling tasks, so I think the choice between them is only a matter of taste.