def schedule=(schedule_hash)
      schedule_hash = prepare_schedule(schedule_hash)
      to_remove = get_all_schedules.keys - schedule_hash.keys.map(&:to_s)

      schedule_hash.each do |name, job_spec|
        set_schedule(name, job_spec)
      end

      to_remove.each do |name|
        remove_schedule(name)
      end

      @schedule = schedule_hash
    end
def schedule=(schedule_hash)
      schedule_hash = prepare_schedule(schedule_hash)
      to_remove = get_all_schedules.keys - schedule_hash.keys.map(&:to_s)

      schedule_hash.each do |name, job_spec|
        set_schedule(name, job_spec)
      end

      to_remove.each do |name|
        remove_schedule(name)
      end

      @schedule = schedule_hash
    end
Accepts a new schedule configuration of the form:

   {
     "MakeTea" => {
       "every" => "1m" },
     "some_name" => {
       "cron"        => "5/* * * *",
       "class"       => "DoSomeWork",
       "args"        => "work on this string",
       "description" => "this thing works it"s butter off" },
     ...
   }

 Hash keys can be anything and are used to describe and reference
 the scheduled job. If the "class" argument is missing, the key
 is used implicitly as "class" argument - in the "MakeTea" example,
 "MakeTea" is used both as job name and sidekiq worker class.

 :cron can be any cron scheduling string

 :every can be used in lieu of :cron. see rufus-scheduler's 'every' usage
 for valid syntax. If :cron is present it will take precedence over :every.

 :class must be a sidekiq worker class. If it is missing, the job name (hash key)
 will be used as :class.

 :args can be any yaml which will be converted to a ruby literal and
 passed in a params. (optional)

 :description is just that, a description of the job (optional). If
 params is an array, each element in the array is passed as a separate
 param, otherwise params is passed in as the only parameter to perform.