Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Rube newb: What is the term for this?

Reply
Thread Tools

Rube newb: What is the term for this?

 
 
Sam Wilson
Guest
Posts: n/a
 
      01-13-2009
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?
 
Reply With Quote
 
 
 
 
Ruby Rabbit
Guest
Posts: n/a
 
      01-13-2009
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/.

 
Reply With Quote
 
 
 
 
Phlip
Guest
Posts: n/a
 
      01-13-2009
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...
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Long term project - Osborne Executive Mod bigal Case Modding 273 12-27-2011 03:11 PM
You know news in the camera world is scarce when Rube Goldberg showsup... RichA Digital Photography 1 08-03-2010 11:58 AM
Clarification Term: "Behavioural Description" Nikos Mitas VHDL 2 09-27-2005 05:36 AM
Signal Handling/Term::ReadLine problem in Perl John C. Worsley Perl 0 01-21-2004 01:51 AM
Short term contract work (1M) for indian internet programmers Alex Varghese Perl 5 10-12-2003 05:33 AM



Advertisments