Skip to content

Instantly share code, notes, and snippets.

@jdelStrother
Created October 3, 2013 14:55
Show Gist options
  • Select an option

  • Save jdelStrother/6811170 to your computer and use it in GitHub Desktop.

Select an option

Save jdelStrother/6811170 to your computer and use it in GitHub Desktop.
class RecurringWorker
def perform
next_runtime = Time.now+10.minutes
do_something
Delayed::Job.enqueue RecurringWorker.new, :run_at => next_runtime
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment