I am using https://github.com/mperham/sidekiq gem in a rails app to schedule tasks at a specific date and time.. Ex: Send appointment reminder 10minutes before the appointment schedule time.
class TextWorker
include Sidekiq::Worker
def perform(appointer_id)
number = Usermodel.find_by_id(appointer_id).contact
Message.create(:from => email,
:to => number,
:body => 'Thank you...Your appointment is at 10/1/2015 Sun, at 12pm')
end
end
and calling it here in appointments controller:
class Appointments_controller
def create
TextWorker.delay_until(10/20/2014, 13:40).perform_async(@user_contact)
end
delay_until doesn't work with specific date/time:
Is there any other way to perform a task at a specific date/time in sideqik? if so how? please