Jaime Mora R.
escribió:> este [3] screencast se explica muy bien esto.
[email protected]
http://lists.simplelogica.net/mailman/listinfo/ror-es
Hola, estoy en la misma tesitura, necesito correr bajo background dos
códigos, uno que se ejecute semanalmente todos los lunes y otro el 10 de
cada mes.
He estado mirando el daemon_generator, después de ver no se cuántas
páginas y ver que el repositorio lo han cambiado, he bajado el plugin
desde la url que mencionas [1]. Lo he descomprimido y lo he metido en
vendor/plugins/daemon_generator tal como viene en ese enlace:
README
generators/
/daemons/
daemon_generator.rb
templates/
install.rb
Es correcto?
Luego he seguido las indicaciones:
script/generate daemon test
lib/daemons/test_ctl start
viendo el log de log/test.rb.log, me sale ésto:
*** below you find the most recent exception thrown, this will be likely
(but not certainly) the exception that made the application exit
abnormally ***
#<Errno::ENOENT: No such file or directory -
/home/intranet/desarrollo/log/test.rb.pid>
*** below you find all exception objects found in memory, some of them
may have been thrown in your application, others may just be in memory
because they are standard exceptions ***
#<NoMemoryError: failed to allocate memory>
#<SystemStackError: stack level too deep>
#<fatal: exception reentered>
#<LoadError: no such file to load – daemons>
#<LoadError: no such file to load – active_support>
#<Gem::Exception: can’t activate activesupport (= 2.0.2), already
activated activesupport-2.1.0]>
#<Errno::ENOENT: No such file or directory -
/home/intranet/desarrollo/log/test.rb.pid>
Es la primera vez que intento hacer un demonio de éstos, dice que no
existe test.rb.pid, existe uno que se llama test.rb_monitor.pid. Alguna
sugerencia?
Para ejecutar mis dós códigos el lunes semanalmente y el otro el 10 de
casa mes, es aconsejable usar este o algún otro? Gracias
[1] GitHub - dougal/daemon_generator: A plugin for creating psuedo-scheduled jobs in Ruby on Rails.