Say I want to send out an email once a day to people who's name is "Bob". Would I use script/runner in conjunction with cron? Or is there another cool(er) way now? Thanks, Joe
on 2006-05-26 04:54
on 2006-05-26 05:07
I don't like script/runner...Correct me if I'm wrong, but I don't think you can pass in a file to runner. I just use a normal cron script, hooked up to rails that loads all the models I'll need. I've been doing it this way since pre-script/runner: http://wiki.rubyonrails.com/rails/pages/HowToPopul... But there looks to be a better way of accomplishing it these days: http://wiki.rubyonrails.com/rails/pages/Environments#script http://jaxn.org/blog/archives/1753-cron-jobs-in-rails
on 2006-05-26 18:11
On May 25, 2006, at 8:04 PM, subimage interactive wrote: > I don't like script/runner...Correct me if I'm wrong, but I don't > think you can pass in a file to runner. I just use a normal cron > script, hooked up to rails that loads all the models I'll need. > I've been doing it this way since pre-script/runner: Why the requirement to pass in a file? I create a class in lib/ and invoke a class method. script/runner -e production "Report.daily" for instance. This command *is* invoked by cron. The nice thing about this is that it's *just Rails*. You don't need to think about the environment for a moment. :-) -- -- Tom Mornini
on 2006-05-29 08:58
I perform a lot of maintenance...on a few of my sites it requires massive data download / import / crunching of massive XML/CSV files. Couple that with old session cleanup, stats generation, etc & it's a lot easier to maintain the code in one spot. I suppose for simple things the runner might be a nice way to go.