title: how setup active_job and rescue scheduler?
body: <p>I'm trying to create background jobs for email notification and scraper.
  I use resque-scheduler (4.0.0), resque (1.25.2) and rails 4.2.1.</p>
  
  <p>My config.ru file:</p>
  
  <pre><code># This file is used by Rack-based servers to start the application.
  require ::File.expand_path('../config/environment', __FILE__)
  run Rails.application
  
  require 'resque/server'  
  run Rack::URLMap.new "/" =&gt; AppName::Application,  "/resque" =&gt; Resque::Server.new
  </code></pre>
  
  <p>My /lib/tasks/resque.rake:</p>
  
  <pre><code>require 'resque/tasks'
  require 'resque/scheduler/tasks'
  
  namespace :resque do
    task :setup do
      require 'resque'
      require 'resque-scheduler'
  
      Resque.schedule = YAML.load_file("#{Rails.root}/config/resque_schedule.yml")
      Dir["#{Rails.root}/app/jobs/*.rb"].each { |file| require file }
    end
  end
  </code></pre>
  
  <p>My /config/resque_scheduler.yml:</p>
  
  <pre><code>CheckFsUpdatesJob:
    queue: fs_updates
    every:
      - '1h'
      - :first_in: '10s'  
    class: CheckFsUpdatesJob
    args:
    description: scrape page
  </code></pre>
  
  <p>My /config/initializer/active_job.rb</p>
  
  <pre><code>ActiveJob::Base.queue_adapter = :resque
  </code></pre>
  
  <p>My /config/initializer/resque.rb:</p>
  
  <pre><code>#config/initializers/resque.rb
  require 'resque-scheduler'
  require 'resque/scheduler/server'
  
  uri = URI.parse("redis://localhost:6379/")  
  Resque.redis = Redis.new(:host =&gt; uri.host, :port =&gt; uri.port, :password =&gt; uri.password)
  
  Resque.after_fork = Proc.new { ActiveRecord::Base.establish_connection }
  
  Dir["#{Rails.root}/app/jobs/*.rb"].each { |file| require file }
  Resque.schedule = YAML.load_file(Rails.root.join('config', 'resque_schedule.yml'))
  
  Resque::Server.use(Rack::Auth::Basic) do |user, password|
    user = 'admin'
    password = 'admin'
  end
  </code></pre>
  
  <p>My first job for emails notifications:</p>
  
  <pre><code>class EmailNotificationJob &lt; ActiveJob::Base
    queue_as :email_notifications
  
    def perform(episode_id, email)
      NotificationMailer.new_record_appears(record_id, email).deliver_now
    end
  end
  </code></pre>
  
  <p>My second job for scheduled runs:</p>
  
  <pre><code>class CheckFsUpdatesJob &lt; ActiveJob::Base
    queue_as :fs_updates
  
    def perform()
      FsStrategy.new.check_for_updates
    end
  end
  </code></pre>
  
  <p>So I have to jobs:
   1. emails notifications - should sends email when new record in DB appears
   2. scrape a page - should runs every hour</p>
  
  <p>How I run it:</p>
  
  <pre><code>redis-server
  rake environment resque:work QUEUE=fs_updates
  rake environment resque:work QUEUE=email_notifications
  rake environment resque:scheduler
  rails s
  </code></pre>
  
  <p>After running these commands I see in Resque Dashboard two workers and two queues, as it is expected.</p>
  
  <p>But! </p>
  
  <p>After clicking on 'queue now' button at resque Schedule tab, I see that task was created and wroted to "fs_updates" queue. But it's not running and in a few second it dissapears. </p>
  
  <p>When I run a job for emails sending from rails console - it does not work at all.</p>
  
  <p>Please, help me to fix my configurations.
  Thanks kindly! </p>