Hi, I''m completely new to Ruby and RoR and yet I have an assignment due in less than a week =( One part of the assignment states that my RoR app will have to create a new page each day. I''m wondering what is the best way to get this done? Should there be a continuous process running on the server to detect the start of a new day to create a page for that day or should it be more request-driven? Any help is much appreciated. Thanks! -- View this message in context: http://www.nabble.com/How-to-automatically-Create-a-new-page-each-day--tp23609364p23609364.html Sent from the RubyOnRails Users mailing list archive at Nabble.com.
Frederick Cheung
2009-May-19 07:24 UTC
Re: How to automatically Create a new page each day?
On May 19, 4:54 am, sayeo87 <yeosuan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I''m completely new to Ruby and RoR and yet I have an assignment due in less > than a week =( One part of the assignment states that my RoR app will have > to create a new page each day. I''m wondering what is the best way to get > this done? Should there be a continuous process running on the server to > detect the start of a new day to create a page for that day or should it be > more request-driven? Any help is much appreciated. Thanks! >I''d probably just have a cronjob that ran once a day. Fred> -- > View this message in context:http://www.nabble.com/How-to-automatically-Create-a-new-page-each-day... > Sent from the RubyOnRails Users mailing list archive at Nabble.com.
What do you mean by ''create a new page for each day''? Colin 2009/5/19 Frederick Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> > > > On May 19, 4:54 am, sayeo87 <yeosuan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi, > > > > I''m completely new to Ruby and RoR and yet I have an assignment due in > less > > than a week =( One part of the assignment states that my RoR app will > have > > to create a new page each day. I''m wondering what is the best way to get > > this done? Should there be a continuous process running on the server to > > detect the start of a new day to create a page for that day or should it > be > > more request-driven? Any help is much appreciated. Thanks! > > > I''d probably just have a cronjob that ran once a day. > > Fred > > -- > > View this message in context: > http://www.nabble.com/How-to-automatically-Create-a-new-page-each-day... > > Sent from the RubyOnRails Users mailing list archive at Nabble.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 -~----------~----~----~----~------~----~------~--~---
My idea is 1. put one shell script file to create the page which will run every day at 12:01 am. 2. name the file as today''s date. 3. display the file named as todays date. Simple!!!!! On Tue, May 19, 2009 at 12:58 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> What do you mean by ''create a new page for each day''? > Colin > > 2009/5/19 Frederick Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > >> >> >> >> On May 19, 4:54 am, sayeo87 <yeosuan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > Hi, >> > >> > I''m completely new to Ruby and RoR and yet I have an assignment due in >> less >> > than a week =( One part of the assignment states that my RoR app will >> have >> > to create a new page each day. I''m wondering what is the best way to get >> > this done? Should there be a continuous process running on the server to >> > detect the start of a new day to create a page for that day or should it >> be >> > more request-driven? Any help is much appreciated. Thanks! >> > >> I''d probably just have a cronjob that ran once a day. >> >> Fred >> > -- >> > View this message in context: >> http://www.nabble.com/How-to-automatically-Create-a-new-page-each-day... >> > Sent from the RubyOnRails Users mailing list archive at Nabble.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 -~----------~----~----~----~------~----~------~--~---
Marnen Laibow-Koser
2009-May-19 15:53 UTC
Re: How to automatically Create a new page each day?
Colin Law wrote:> What do you mean by ''create a new page for each day''? > ColinThis is the $64,000 question. If "create a new page each day" just means "respond to URLs with a date in them" or "display today''s content", then there is no need for a cron job and the date can just be processed like any other parameter. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.
Beware of bad SEO practices... Cheers, Sazima On May 19, 12:53 pm, Marnen Laibow-Koser <rails-mailing-l...@andreas- s.net> wrote:> Colin Law wrote: > > What do you mean by ''create a new page for each day''? > > Colin > > This is the $64,000 question. If "create a new page each day" just > means "respond to URLs with a date in them" or "display today''s > content", then there is no need for a cron job and the date can just be > processed like any other parameter. > > Best, > -- > Marnen Laibow-Koserhttp://www.marnen.org > mar...-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > -- > Posted viahttp://www.ruby-forum.com/.