tags:

views:

63

answers:

2

Hello, I am trying to learn how ruby is used in a server based back end environment. For example I want to be running a ruby script 24/7 on a server. What are the best practices for this and how does one go about doing this?

Can anyone provide some resources on how to do this or if you could label what I am trying to do? I am unsure of the terms that I am supposed to be googling.

A: 

Try BackgroundRb - this is a special Rails plugin that works like a Linux daemon. You could use any classes/models defined in your Rails application within the background code. You could also pass data to/from background process.

Alex Kaushovik
+1  A: 

Use cron. From OS point of view Ruby app is just a script like bash. Also all Unix OSes have some kind of daemon script (like see examples in /etc/init.d)

Zepplock