title: Whenever using development database in production
body: <p>I am using Whenever v0.9.7 with Rails 4.2.4. whenever is using development database in production also. </p>
  
  <p>When i execute <code>whenever</code> i get following which shows production. But the time retrieved here is from development database and not production.</p>
  
  <pre><code>45 10 * * * /bin/bash -l -c 'cd /data/swati/Projects/metal &amp;&amp; bundle exec bin/rails runner -e production '\''Mixins::UploadMaster.new.upload_data(ErpFile.find(4).table_name, ErpFile.find(4).file_name)'\'' &gt;&gt; /data/swati/Projects/metal/log/cron_log.log 2&gt;&amp;1'
  </code></pre>
  
  <p>Can anyone help resolve the issue?</p>
  
  <p>Here is my schedule.rb</p>
  
  <pre><code>require File.expand_path('../environment', __FILE__)
  
  set :output, ENV["CRON_LOG_FILE"]
  
  erp_access = ErpAccess.first
  
  erp_access.erp_files.each do |erp_file|
   if erp_file.start_time
    if erp_file.repeat_hours
     every erp_file.repeat_hours.hours, at: erp_file.start_time do
       toRun = 'Mixins::UploadMaster.new.upload_data(ErpFile.find(' + erp_file.id.to_s + ').table_name, ErpFile.find('+ erp_file.id.to_s + ').file_name)'
      runner toRun
     end
    end
   end
  end
  </code></pre>