> 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 ch
Citation needed.
Quoting Julian Leviston :
>
> That can be spoofed
>
> Blog: http://random8.zenunit.com/
> Learn rails: http://sensei.zenunit.com/
>
> On 14/02/2009, at 4:21 AM, "Jeffrey L. Taylor"
> wrote:
>
> >
> > If there are no hostile users on the server, in the controller:
> >
> > i
No quite like that. If you're sending an HTTP GET request to any URL, you
would pass parameters to the URL itself, something like:
http://localhost:3000/cron?param1=value1¶m2=value2 etc
What looks attractive to me about this approach (of using wget via cron
instead of a rake task) is that you are
On Saturday 14 February 2009 12:52 am, Valentino Lun wrote:
> Is it possible to do this in my crontab as follow?
>
> 10 10 * * * wget http://localhost:3000/cron/someaction "para1" "para2"
I'm not sure, but an alternative is to put the wget command in a small
shell script (Linux talk, iiuc) or a
>> wget http://localhost:3000/cron
>>
>> cron_controller invokes your method
>
> Thanks, it is a very good idea. How about if my action require 2
> parameters? How to do that?
Let me further elabroate on my question. For example in my Cron
Controller
def someaction
some_method(params[:on
>> happy attempting a DoS. Wondering if you handle that somehow (IP
>> address
>> check or something)?
>>
>> -Original Message-
>> From: Mario Gutierrez
>> Reply-to: rubyonrails-talk@googlegroups.com
>> To: rubyonrails-talk@googlegroups.com
>>
Mario Gutierrez wrote:
> I use cron to schedule wget:
>
> wget http://localhost:3000/cron
>
> cron_controller invokes your method
Thanks, it is a very good idea. How about if my action require 2
parameters? How to do that?
Thanks again
Valentino
--
Posted via http://www.ruby-forum.com/.
-
ooglegroups.com
> Subject: [Rails] Re: Schedule job in rails
> Date: Fri, 13 Feb 2009 16:55:27 +0100
>
>
> I use cron to schedule wget:
>
> wget http://localhost:3000/cron
>
> cron_controller invokes your method
--~--~-~--~~~---~--~~
Yo
Harold A. Gimenez wrote:
> That's a great idea, until someone in the outside finds out about that
> path/resource. You're opening up too much and scriptkiddies can get
> happy attempting a DoS. Wondering if you handle that somehow (IP address
> check or something)?
How about using HTTP basic auth
Reply-to: rubyonrails-talk@googlegroups.com
To: rubyonrails-talk@googlegroups.com
Subject: [Rails] Re: Schedule job in rails
Date: Fri, 13 Feb 2009 16:55:27 +0100
I use cron to schedule wget:
wget http://localhost:3000/cron
cron_controller invokes y
I use cron to schedule wget:
wget http://localhost:3000/cron
cron_controller invokes your method
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" gr
Hi look this
http://www.railsenvy.com/2007/6/11/ruby-on-rails-rake-tutorial
--
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 gro
Check out http://railscasts.com/episodes/128-starling-and-workling and
http://railscasts.com/episodes/130-monitoring-with-god
There are a number of different ways to have a task persist, and run on
a regular schedule. I've also previously used background-db and cron
seems to be a popular optio
> I think a more common solution would be to create a rake task which
> you invoke with cron...
Thank for your reply
How can I do it with rake task? Can you give me some reference?
Thanks again
Valentino
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~
Especially if this method is accessing your models, I don't see a way
around loading your entire rails environment.
I think a more common solution would be to create a rake task which
you invoke with cron...
On Feb 12, 10:53 pm, Valentino Lun
wrote:
> Dear all
>
> I tried script/runner for this
Dear all
I tried script/runner for this, but every execution need to initialize
the rails environment. Any other good idea for it? What is your
good/best practice?
Many thanks
Valentino
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You recei
16 matches
Mail list logo