refactor scheduler code
support quartz and delayed job in jruby