Re: [Rails] how to run a cron file

2010-05-08 Thread Jeffrey L. Taylor
Quoting Manish Nautiyal :
> Hi all
> 
> I want to run this in production mode.
> 
> RAILS_ENV=production  ruby script/runner lib/camp.rb  in cron file.
> 
> what i have done in cron file is below
> 
> * * * * * RAILS_ENV=production /usr/bin/ruby
> /mnt/apps/NearbyAd/current/script/runner
> /mnt/apps/NearbyAd/current/lib/camp.rb
> 
Try

* * * * *   cd /mnt/apps/NearbyAd/current; ./script/runner -e production
lib/camp.rb

HTH,
  Jeffrey

-- 
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] how to run a cron file

2010-05-08 Thread Manish Nautiyal
Hi all

I want to run this in production mode.

RAILS_ENV=production  ruby script/runner lib/camp.rb  in cron file.

what i have done in cron file is below

* * * * * RAILS_ENV=production /usr/bin/ruby
/mnt/apps/NearbyAd/current/script/runner
/mnt/apps/NearbyAd/current/lib/camp.rb

but i didn't get any success.

/usr/bin/ruby i got from  which ruby

please help me.
-- 
Posted via http://www.ruby-forum.com/.

-- 
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.