to run any function at periodically in SYSTEM then we can use crontab tool. for the same purpose,is there anything into RAILS project ? -- 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
BackgroundRB I think can run scheduled tasks. On Tue, Jun 10, 2008 at 2:55 PM, Pokkai Dokkai < rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > to run any function at periodically in SYSTEM then we can use crontab > tool. > for the same purpose,is there anything into RAILS project ? > -- > Posted via http://www.ruby-forum.com/. > > > >-- Appreciated my help? Recommend me on Working With Rails http://workingwithrails.com/person/11030-ryan-bigg --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 10 June 2008 07:25:04 Pokkai Dokkai wrote:> to run any function at periodically in SYSTEM then we can use crontab > tool. > for the same purpose,is there anything into RAILS project ?Your Rails application will include a script/runner script. You can use it to run (slow-loading) code in the context of your Rails application from cron jobs. Just remember to set RAILS_ENV=production in the crontab in production. :-) If your jobs must fire frequently, consider something like backgroundrb instead. Ciao, Sheldon. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFITkpzpGJX8XSgas0RAvJVAKCXUGf+DqGr16L3YeoURfIS9WjHcgCfcxYO CAo0TZv6hbMUaRCWHAVVJko=MVCM -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Sheldon Hearn wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Tuesday 10 June 2008 07:25:04 Pokkai Dokkai wrote: > > Your Rails application will include a script/runner script. You can use > it to run (slow-loading) code in the context of your Rails application > from cron jobs. Just remember to set RAILS_ENV=production in the > crontab in production. :-) > > If your jobs must fire frequently, consider something like backgroundrb > instead. > > Ciao, > Sheldon. > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > > iD8DBQFITkpzpGJX8XSgas0RAvJVAKCXUGf+DqGr16L3YeoURfIS9WjHcgCfcxYO > CAo0TZv6hbMUaRCWHAVVJko> =MVCM > -----END PGP SIGNATURE-----i thing sleep(1.hour) inside another Thread will it give any problem ? -- 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 10 June 2008 13:19:14 Pokkai Dokkai wrote:> sleep(1.hour) inside another Thread > > will it give any problem ?Why in another thread? Just put it in the main loop of your script. Ciao, Sheldon. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIT+WvpGJX8XSgas0RAuBCAJ443+P/AMz1pAYfvx8Aw9vc+cTw0wCfT+y/ z3cAUFGlxC+6SyqPyq59rg8=OWAd -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Quoting Sheldon Hearn <sheldonh-UjuPna88SMAqcZcGjlUOXw@public.gmane.org>:> > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Tuesday 10 June 2008 07:25:04 Pokkai Dokkai wrote: > > to run any function at periodically in SYSTEM then we can use crontab > > tool. > > for the same purpose,is there anything into RAILS project ? > > Your Rails application will include a script/runner script. You can use > it to run (slow-loading) code in the context of your Rails application > from cron jobs. Just remember to set RAILS_ENV=production in the > crontab in production. :-) >I''d suggest changing to your application''s home/root directory and then invoking the function with script/runner. I found the results variable until I added the change directory. It has been rock solid ever since. For example: 3-58/5 * * * * cd /home/jeff/Rails/amethyst; nice ./script/runner -e development ''Preload.preload'' &> /dev/null Runs at 3, 8, 13, 18, ... minutes after the hour. Calls the preload() function in the Preload module in development mode. And drops the output into the bit bucket. Leave off the "&> /dev/null" part until you are sure it is running without problems. Depending on your setup (e.g. production vs. development databases) you may wish to run in production mode. It may run faster. 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---