From: Lars Haugseth Date: 2009-02-03T07:14:47+09:00 Subject: Re: Is there any Plugins for log file analysis in ruby? * Andrew Timberlake wrote: > > On Sat, Jan 31, 2009 at 8:55 AM, Vikas Gholap wrote: > > > how i execute the ruby program on unix's cron job utility.? > > If you're working with rails, you could write a rake task and call that from > cron or just run a ruby script directly like: > * * * * * /usr/bin/ruby /path/to/your/ruby/script.rb If you're running a Rake task, most of these will expect the root of your Rails project to be the current directory. Unless running in development you will also want to specify the environment: m h * * * (cd /path/to/project; RAILS_ENV=production /usr/bin/rake my:task) -- Lars Haugseth "If anyone disagrees with anything I say, I am quite prepared not only to retract it, but also to deny under oath that I ever said it." -Tom Lehrer