# Rails + batch jobs

**URL:** <https://www.ruby-forum.com/t/rails-batch-jobs/76366>\
**Category:** Rails\
**Created:** [November 18, 2006, 12:22am UTC](https://www.ruby-forum.com/t/rails-batch-jobs/76366 "2006-11-18T00:22:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![so0ly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@so0ly](https://www.ruby-forum.com/u/so0ly)\
**Post date:** [November 18, 2006, 12:22am UTC](https://www.ruby-forum.com/t/rails-batch-jobs/76366/1 "2006-11-18T00:22:45Z")

</div>

Hey,

I’m wondering how to run a batch job on a rails server. And would this  
be possible on a shared hosting like bluehost? what about capistrano?

thnx in advance,  
DP

---

<div class="post-metadata">

**Author:** ![so0ly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@so0ly](https://www.ruby-forum.com/u/so0ly)\
**Post date:** [November 18, 2006, 12:45am UTC](https://www.ruby-forum.com/t/rails-batch-jobs/76366/2 "2006-11-18T00:45:46Z")

</div>

Hi Daan,  
If your trying to run a job that will need to be run from time to  
time manually, then you should write a rake task and put it in your  
lib/tasks/ directory. If your trying to run something automated then  
you need to look at BackgroundRB [1] or RailsCron[2]. Note that  
RailsCron is no longer supported, but I still like it better than  
BackgroundRB.

Good Luck,  
Rob K.

[1] [http://backgroundrb.rubyforge.org/](http://backgroundrb.rubyforge.org/)  
[2] [http://svn.kylemaxwell.com/not\_supported/rails\_cron/trunk/README](http://svn.kylemaxwell.com/not_supported/rails_cron/trunk/README)

---

<div class="post-metadata">

**Author:** ![so0ly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@so0ly](https://www.ruby-forum.com/u/so0ly)\
**Post date:** [November 18, 2006, 2:15pm UTC](https://www.ruby-forum.com/t/rails-batch-jobs/76366/3 "2006-11-18T14:15:57Z")

</div>

Hey,

I tried installing backgroundrb by following the Readme, but i always  
get errors when i try to start up the server. I’ve installed Slave  
1.0.0, Daemons 1.0.3 and the plugin from the bgrb site.

gr  
Daan P.

This is the error i get  
rake backgroundrb:start --trace  
(in E:/RailsProjecten/EigenhomeProjecten/eigenhome\_BackgrounDRB)  
\*\* Invoke backgroundrb:start (first\_time)  
\*\* Execute backgroundrb:start  
rake aborted!  
Exec format error -  
E:/RailsProjecten/EigenhomeProjecten/eigenhome\_BackgrounDRB/  
config/…/script/backgroundrb start  
c:/Program  
Files/Ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_supp  
ort/core\_ext/kernel/agnostics.rb:7:in `' c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_supp ort/core_ext/kernel/agnostics.rb:7:in`’  
./vendor/plugins/backgroundrb/tasks/backgroundrb\_tasks.rake:55  
c:/Program  
Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `exec ute' c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in`exec  
ute’  
c:/Program  
Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invo ke' c:/Program Files/Ruby/lib/ruby/1.8/thread.rb:135:in`synchronize’  
c:/Program  
Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invo ke' c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in`run  
’  
c:/Program  
Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run  
’  
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7  
c:/Program Files/Ruby/bin/rake.bat:25

---

<div class="post-metadata">

**Author:** ![so0ly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@so0ly](https://www.ruby-forum.com/u/so0ly)\
**Post date:** [November 18, 2006, 8:32pm UTC](https://www.ruby-forum.com/t/rails-batch-jobs/76366/4 "2006-11-18T20:32:49Z")

</div>

I just found out that the new release of BgRB doesn’t work on Rails, my  
friend has it working on mac. Now my question is will it work on  
Bluehost ? Or is there an alternative that works under windows ?

grtz  
DP
