Problems with no method error with rufus scheduler


I have a problem with rufus. I created a test.rb file in the /config/ initializers folder.


  require 'rubygems'   require 'rufus/scheduler'

  scheduler = Rufus::Scheduler.start_new

  scheduler.each '10s' do     puts "hey see you in 10seconds!"   end

works fine so far. Now I change it to:


  require 'rubygems'   require 'rufus/scheduler'

  scheduler = Rufus::Scheduler.start_new

  scheduler.each '10s' do     recipe = Recipe.check_for_new_print_jobs   end

And here I get an error.. etc. method check_for_new_print_jobs not found.

The method is in the recipe controller


class RecipeController < ApplicationController

def index end

def show end

def check_for_new_print_jobs'test_scheduler', 'a') do |f1|     f1 << "Hey, I am still alive" + "\n"   end end

ruby -v ruby 1.8.6

rails -v rails 2.3.5

Can anyone give me a hint? Is there something special to do, because I am calling a method out of a initializer file? Thank you very much.