Questions tagged [ruby-daemons]

Daemons provides an easy way to wrap existing ruby scripts (for example a self-written server) to be run as a daemon and to be controlled by simple start/stop/restart commands.

Daemons provides an easy way to wrap existing ruby scripts (for example a self-written server) to be run as a daemon and to be controlled by simple start/stop/restart commands.

You can also call blocks as daemons and control them from the parent or just daemonize the current process. Besides this basic functionality, daemons offers many advanced features like exception backtracing and logging (in case your ruby script crashes) and monitoring and automatic restarting of your processes if they crash.

Daemon-kit aims to simplify creating Ruby daemons by providing a sound application skeleton (through a generator), task specific generators (jabber bot, etc) and robust environment management code.

Find more info about projects and plug-ins for daemonizing in Ruby here

18 questions
0
votes
1 answer

Persisting thread in delayed_job

So I have a rails app where I want my delayed job process to communicate with an SMPP server. But the problem occurs when I try to send the messages. My thread that I created in an initializer (delayed_job.rb): if $0.ends_with?('/delayed_job') …
0
votes
1 answer

Launch a daemon in a simple rail application

I have a simple controller and I want that controller to launch a daemon to do a background job (it read the sstdin data feeded by an Arduino board connected to the computer). class DaemonController < ApplicationController def index require…
0
votes
3 answers

How to run a rake task with cron just twice?

I want to know if there is a way in RoR to run a rake task, or a ruby code, twice in different times. For example, when a user registers, run the task after three days, and then run the same task one week later, but no more('stop the process'). I…
Dagosi
  • 948
  • 2
  • 11
  • 25
1
2