Is there a way to make some method to act on a specific time? Right now, i managed to bypass this problem by attaching this method to the login factor of the site (everytime an admin log in the site, also this method is called) , but there is a more direct and time related way? -- Posted via http://www.ruby-forum.com/.
Enzo Rivello wrote:> Is there a way to make some method to act on a specific time? > > Right now, i managed to bypass this problem by attaching this method to > the login factor of the site (everytime an admin log in the site, also > this method is called) , but there is a more direct and time related > way?If you''re on a *NIX system your should use cron to run a standalone program. Start it with script/runner to gain access to all the models defined by your Rails application. If you just need to call a URL, use cron to run a wget to that URL. Windows has it''s own scheduled tasks systems so you should be able to solve your problems there as well. -- Posted via http://www.ruby-forum.com/.
Take a look at Rufus Scheduler (http://rufus.rubyforge.org/rufus- scheduler/) is working great for me, and is not plataform dependent. Regards. Franco Catena. On Jul 15, 5:29 am, Enzo Rivello <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Is there a way to make some method to act on a specific time? > > Right now, i managed to bypass this problem by attaching this method to > the login factor of the site (everytime an admin log in the site, also > this method is called) , but there is a more direct and time related > way? > -- > Posted viahttp://www.ruby-forum.com/.