Rufus scheduler on Windows Server 2012 using Thin Redmine 3.3.0
Added by Mark Wintch about 8 years ago
I attempted to run this command, but it was unknown command in my environment
RAILS_ENV=YOUR_ENVIRONMENT script/about
• Before explaining your problem, please add the following information:
- Ruby implementation and version ruby 2.1.8p440 (2015-12-16 revision 53160) [x64-mingw32]
•
- Rails version (rails --version) 4.2.6
•
- Operating system (precise if you're using cygwin when running on Windows) Windows Server 2012 64 bit
•
- Database used, and its version SQL 2012
Ruby-aware server used: Webrick, Mongrel, Thin, etc. If you don't understand this point, you're using Webrick. Thin
I followed the tutorial from here: http://www.redmine.org/projects/redmine/wiki/RedmineReceivingEmails#Issue-attributes
I am attempting to use Rufus scheduler gem to automatically rake my email. I have installed the gem and I see it installed after running bundler. I created a file named rufus-scheduler.rb in the /config/initializers folder and restarted the application. This is the contents of that file.
require 'rubygems'
require 'rake'
require 'rufus-scheduler'
load File.join(Rails.root, 'Rakefile')
ENV['host']='imap.gmail.com'
ENV['port']='993'
ENV['ssl']='SSL'
ENV['username']='email address’
ENV['password']=password
scheduler = Rufus::Scheduler.new
# Check emails every 10 mins
scheduler.interval '10m' do
task = Rake.application['redmine:email:receive_imap']
task.reenable
task.invoke
end
This has not had any effect thus far and the emails are still sitting waiting to be processed. My guess is that I need to create the tasks that this is calling. I am out of my depth here though on the coding for Ruby and am in need of experienced assistance please.
Thank you!