# How to automatically Create a new page each day?

**URL:** <https://www.ruby-forum.com/t/how-to-automatically-create-a-new-page-each-day/168295>\
**Category:** Rails\
**Created:** [May 19, 2009, 9:18am UTC](https://www.ruby-forum.com/t/how-to-automatically-create-a-new-page-each-day/168295 "2009-05-19T09:18:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sayeo87](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e47774/32.png) [@sayeo87](https://www.ruby-forum.com/u/sayeo87)\
**Post date:** [May 19, 2009, 9:18am UTC](https://www.ruby-forum.com/t/how-to-automatically-create-a-new-page-each-day/168295/1 "2009-05-19T09:18:02Z")

</div>

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](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](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![sayeo87](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e47774/32.png) [@sayeo87](https://www.ruby-forum.com/u/sayeo87)\
**Post date:** [May 19, 2009, 9:25am UTC](https://www.ruby-forum.com/t/how-to-automatically-create-a-new-page-each-day/168295/2 "2009-05-19T09:25:08Z")

</div>

On May 19, 4:54 am, sayeo87 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

---

<div class="post-metadata">

**Author:** ![sayeo87](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e47774/32.png) [@sayeo87](https://www.ruby-forum.com/u/sayeo87)\
**Post date:** [May 19, 2009, 9:29am UTC](https://www.ruby-forum.com/t/how-to-automatically-create-a-new-page-each-day/168295/3 "2009-05-19T09:29:53Z")

</div>

What do you mean by ‘create a new page for each day’?  
Colin

2009/5/19 Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![sayeo87](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e47774/32.png) [@sayeo87](https://www.ruby-forum.com/u/sayeo87)\
**Post date:** [May 19, 2009, 5:50pm UTC](https://www.ruby-forum.com/t/how-to-automatically-create-a-new-page-each-day/168295/4 "2009-05-19T17:50:02Z")

</div>

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!!!

---

<div class="post-metadata">

**Author:** ![sayeo87](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e47774/32.png) [@sayeo87](https://www.ruby-forum.com/u/sayeo87)\
**Post date:** [May 19, 2009, 5:53pm UTC](https://www.ruby-forum.com/t/how-to-automatically-create-a-new-page-each-day/168295/5 "2009-05-19T17:53:09Z")

</div>

Colin L. 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-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![sayeo87](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e47774/32.png) [@sayeo87](https://www.ruby-forum.com/u/sayeo87)\
**Post date:** [May 20, 2009, 5:33pm UTC](https://www.ruby-forum.com/t/how-to-automatically-create-a-new-page-each-day/168295/6 "2009-05-20T17:33:44Z")

</div>

Beware of bad SEO practices…

Cheers, Sazima

On May 19, 12:53 pm, Marnen Laibow-Koser \<rails-mailing-l…@andreas-
