Hi, A quick question for anyone out there. I am looking run a Ruby Shell script from a cron job that can access the rails environment, active record and activemail , etc . Does anyone have the particular syntax ? Thanks, Fields Marshall http://www.gonker.net
require ''config/environment'' # From the rails root directory -DF On 8/31/05, Fields Marshall <fmarshall-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> Hi, > A quick question for anyone out there. > I am looking run a Ruby Shell script from a cron job that can access the > rails environment, active record and activemail , etc . > > Does anyone have the particular syntax ? > > > Thanks, > > Fields Marshall > > http://www.gonker.net > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Fields Marshall wrote:> Hi, > A quick question for anyone out there. > I am looking run a Ruby Shell script from a cron job that can access the > rails environment, active record and activemail , etc . > > Does anyone have the particular syntax ?script/runner evaluates its argument in the rails environment, see http://wiki.rubyonrails.com/rails/show/HowToRunBackgroundJobsInRails regards Justin
On Aug 30, 2005, at 8:43 AM, Fields Marshall wrote:> A quick question for anyone out there. > I am looking run a Ruby Shell script from a cron job that can > access the > rails environment, active record and activemail , etc . > > Does anyone have the particular syntax ?require ''rubygems'' require_gem ''activesupport''