Forum: Ruby on Rails Problem adding the OpenWFEru scheduler code in Initialzers

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Karthi k. (Guest)
on 2008-10-22 11:06

I am using OpenWFEru gem for scheduling the weekly mailing in my rails
application. I have written the scheduler code as a stand-alone ruby
code. So I have to run it separately.

But I want this scheduler to start when I start my rails server. I tried
putting this ruby code in config/initializers. But the server is not
getting started as this scheduler code keeps on running.

Following is my ruby code in config/initializers.

  require 'openwfe/util/scheduler'
  include OpenWFE

  scheduler =

  scheduler.schedule('0 9 * * 1') do
    system "ruby D:\\Projects\\Producteering\\script\\runner


Am I doing anything wrong? Or is there any way to achieve this?

Thanks in advance...
This topic is locked and can not be replied to.