how to schedule for every 30 seconds with sidekiq-scheduler
<p>I am working on ROR application.
i have a functionality requirement, where i have to call a method for 
every 30 seconds using sidekiq</p>

<p>and i am using these gems</p>

<pre><code># sidekiq
gem 'sidekiq', '~&gt; 3.3.0'
# sidekiq scheduler
gem 'sidekiq-scheduler', '~&gt; 2.0'
</code></pre>

<p>here is my scheduler.yml file code.</p>

<pre><code>perform:
  every: ["30s"]
  class: Aggregator
  queue: aggregation
  description: "This job will create Aggregate data."
</code></pre>

<p>here is my Aggregator class which inside the Workers folder.</p>

<pre><code>class Aggregator
  include Sidekiq::Worker
  sidekiq_options :backtrace =&gt; 5, :retry =&gt; false

  def perform
    end_time = time - (time.sec%30).seconds
    puts "ROUNDING TO 30 SEC"
    puts end_time    
   Session.create_aggregate_data(end_time)
  end
end
</code></pre>

<p>when i am checking the sidekiq logs it's not hitting the perform method. but the Aggregator class is getting called</p>

<p>here are the logs..</p>

<pre><code>2016-07-27T10:19:59.436Z 15117 TID-1qjnlu INFO: queueing Aggregator (perform)
2016-07-27T10:20:29.641Z 15117 TID-1qjnlu INFO: queueing Aggregator (perform)
2016-07-27T10:20:59.836Z 15117 TID-1qjnlu INFO: queueing Aggregator (perform)
2016-07-27T10:21:30.009Z 15117 TID-1qjnlu INFO: queueing Aggregator (perform)
2016-07-27T10:22:00.204Z 15117 TID-1qjnlu INFO: queueing Aggregator (perform)
2016-07-27T10:22:30.507Z 15117 TID-1qjnlu INFO: queueing Aggregator (perform)
2016-07-27T10:23:00.509Z 15117 TID-1qjnlu INFO: queueing Aggregator (perform)
2016-07-27T10:23:30.760Z 15117 TID-1qjnlu INFO: queueing Aggregator (perform)
2016-07-27T10:24:01.068Z 15117 TID-1qjnlu INFO: queueing Aggregator (perform)
</code></pre>