On Tue, Jan 26, 2010 at 9:06 PM, Conrad Taylor <[email protected]> wrote:
> On Tue, Jan 26, 2010 at 8:47 PM, Vincent P <[email protected]> wrote: > >> I have an administrative task that I need to run once a day: I need >> to iterate through each user in the User table in the database, do >> some calculation involving some other models, and update each user >> record in the database. >> >> I am thinking about just doing it at the console (env=production). >> But I don't want to type all the statements again each time I carry >> out this task. Is there a way to put this in a script and just run >> the script? >> >> Eventually, I'd like to schedule the task to run automatically every >> day, and have some sort of progress display when the task is run. >> >> Thanks, >> >> Vincent. >> >> > Vincent, you might want to consider the whenver gem and you > can view Ryan's screencast here: > > http://media.railscasts.com/videos/164_cron_in_ruby.mov > > Good luck, > > -Conrad > Vincent, you'll install the gem as follows: sudo gem install whenever -Conrad > > >> -- >> >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<rubyonrails-talk%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

