Rube newb: What is the term for this?

Discussion in 'Ruby' started by Sam Wilson, Jan 13, 2009.

  1. Sam Wilson

    Sam Wilson Guest

    I'm learning Ruby, I'm sorry if this question is stupid.

    Let's say a have a blog. Can Ruby do some operations to the database
    let's say once a day. Just for imagination's sake let's say the
    operation would be to create a new post that inputs standard info like
    "I like turtles today!" and it does this every day. But it doesn't
    require a person to visit the site to happen.

    What's this kind of operation called and is it a pain in the neck to
    make work?
    Sam Wilson, Jan 13, 2009
    #1
    1. Advertising

  2. Sam Wilson

    Ruby Rabbit Guest

    Sam Wilson wrote:
    > I'm learning Ruby, I'm sorry if this question is stupid.
    >
    > Let's say a have a blog. Can Ruby do some operations to the database
    > let's say once a day. Just for imagination's sake let's say the
    > operation would be to create a new post that inputs standard info like
    > "I like turtles today!" and it does this every day. But it doesn't
    > require a person to visit the site to happen.
    >
    > What's this kind of operation called and is it a pain in the neck to
    > make work?

    What you want is a job/cron job, background process, daemon ..

    Any language that can write into your blogs database will do. Even a
    shell script could work. With ruby you can use Ruby DBI or some other
    mapper of your choice to insert into the database.

    Then create an entry in your crontab file (crontab -e) and put the time
    for when you want the script to run.

    Depending on your blog software you may also consider posting to your
    blog rather than writing to the database. Check mtsend.py as an example
    (there are ruby versions also, cant recall, for writing to wordpress and
    other blogs).

    hth

    --
    Posted via http://www.ruby-forum.com/.
    Ruby Rabbit, Jan 13, 2009
    #2
    1. Advertising

  3. Sam Wilson

    Phlip Guest

    Ruby Rabbit wrote:

    >> Let's say a have a blog. Can Ruby do some operations to the database
    >> let's say once a day...


    > What you want is a job/cron job, background process, daemon ..


    RR forgot the disclaimer: Ruby is a language, and this is very probably a
    question about Ruby on Rails, which is a platform. Further questions about Rails
    will get the best answer on its Google Group...
    Phlip, Jan 13, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nikos Mitas
    Replies:
    2
    Views:
    1,012
    Hubble
    Sep 27, 2005
  2. Alex Varghese
    Replies:
    5
    Views:
    411
  3. John C. Worsley
    Replies:
    0
    Views:
    1,390
    John C. Worsley
    Jan 21, 2004
  4. Mark Garland-Jones
    Replies:
    0
    Views:
    334
    Mark Garland-Jones
    Aug 23, 2004
  5. sayoyo
    Replies:
    1
    Views:
    323
    Jacob
    Jul 7, 2003
Loading...

Share This Page