def load_schedule!
      if enabled
        Sidekiq.logger.info 'Loading Schedule'

        # Load schedule from redis for the first time if dynamic
        if dynamic
          Sidekiq.reload_schedule!
          @current_changed_score = Time.now.to_f
          rufus_scheduler.every(dynamic_every) do
            update_schedule
          end
        end

        Sidekiq.logger.info 'Schedule empty! Set Sidekiq.schedule' if Sidekiq.schedule.empty?

        @scheduled_jobs = {}
        queues = sidekiq_queues

        Sidekiq.schedule.each do |name, config|
          if !listened_queues_only || enabled_queue?(config['queue'].to_s, queues)
            load_schedule_job(name, config)
          else
            Sidekiq.logger.info { "Ignoring #{name}, job's queue is not enabled." }
          end
        end

        Sidekiq.logger.info 'Schedules Loaded'
      else
        Sidekiq.logger.info 'SidekiqScheduler is disabled'
      end
    end
def load_schedule!
      if enabled
        Sidekiq.logger.info 'Loading Schedule'

        # Load schedule from redis for the first time if dynamic
        if dynamic
          Sidekiq.reload_schedule!
          @current_changed_score = Time.now.to_f
          rufus_scheduler.every(dynamic_every) do
            update_schedule
          end
        end

        Sidekiq.logger.info 'Schedule empty! Set Sidekiq.schedule' if Sidekiq.schedule.empty?

        @scheduled_jobs = {}
        queues = sidekiq_queues

        Sidekiq.schedule.each do |name, config|
          if !listened_queues_only || enabled_queue?(config['queue'].to_s, queues)
            load_schedule_job(name, config)
          else
            Sidekiq.logger.info { "Ignoring #{name}, job's queue is not enabled." }
          end
        end

        Sidekiq.logger.info 'Schedules Loaded'
      else
        Sidekiq.logger.info 'SidekiqScheduler is disabled'
      end
    end
Pulls the schedule from Sidekiq.schedule and loads it into the
 rufus scheduler instance