On Dec 19, 2010, at 1:18 PM, Jeremy Hinegardner wrote:

> On Tue, Dec 14, 2010 at 02:21:21AM +0900, Iain Barnett wrote:
>> Hi,
>>=20
>> I've got a process I'd like to daemonize, a call the twitter search =
API ever 10 minutes or so. There seem to be a few gems that purport to =
make this process easier and I was wondering if anyone could recommend =
(or tell me to avoid) any? Or just any tips to watch out for.
>>=20
>> Any help is much appreciated.
>>=20
>> Regards,
>> Iain
>=20
>=20
> Also take a look at the 'servolux' gem.
>=20
>    http://rubygems.org/gems/servolux
>=20


require 'servolux'

daemon =3D Servolux::Daemon.new(
  :name =3D> 'Twitter Search',
  :pid_file =3D> '/path/to/the/pid/file.pid',
  :startup_command =3D> '/path/to/your/twitter/process'
)
daemon.startup


There are some example files demonstrating how to accomplish various =
tasks:
https://github.com/TwP/servolux/tree/master/examples

And the documentation is fairly thorough:
http://rdoc.info/github/TwP/servolux/master/frames

Blessings,
TwP

PS Being the author of servolux, my opinion is completely biased :)