> def someaction > some_method(params[:one],params[:two]) > end > > Is it possible to do this in my crontab as follow? > > 10 10 * * * wgethttp://localhost:3000/cron/someaction"para1" "para2" >
You will need to pass the para1, and para2 to the someaction method so at a minimum you have to change the signature of the someaction method as below: def someaction para1, para2 ... end now within this method you can do anything you want only thing is that this method needs to be public in scope and you need to make sure that it requires no authentication otherwise your wget request will fail. I usually use script/runner in Rails for such needs. wget may or may not work depending on how restful your routes are and controller action is. Bharat --~--~---------~--~----~------------~-------~--~----~ 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-talk@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 -~----------~----~----~----~------~----~------~--~---