Kicking off external processes

I need to be able to kick off a (relatively) long running process that
runs outside of the normal RoR queue. BackgrounDrb is out of the
question pretty much because shared hosts are fond of killing it. I
don’t necessarily need a process like backgroundrb running because I
don’t need access to these processes once they start. However, they
do need access to my models.

The solution could be as simple as kicking off an external ruby
script, letting it run and finish all on its own.

Any ideas on this?

Thanks!

Well first of all to access your Rails code, all you need to do is in
your
script (assuming it’s in scripts/):

ENV['RAILS_ENV'] =  'production'
require File.dirname(__FILE__) + '/../config/environment'

That said, is this process initiated by user interaction? If not, then
cron
should work well, otherwise you could try a mix of command queuing and a
more frequent cron job (user clicks button, command is queued up and
will be
run at next cron cycle).

Jason

http://backgroundrb.rubyforge.org/

by
TheR

Damjan R. wrote:

http://backgroundrb.rubyforge.org/

by
TheR

Sorry. Didn’t read all post.

by
TheR