Skip to content

Instantly share code, notes, and snippets.

@andrewvc
Created July 28, 2011 07:56
Show Gist options
  • Save andrewvc/1111174 to your computer and use it in GitHub Desktop.
Save andrewvc/1111174 to your computer and use it in GitHub Desktop.
Using the Clockwork gem from a rake task
task :clockwork => :environment do
Clockwork.every(10.seconds, "events.update_viewers") {
Resque.enqueue(ViewerCountWorker)
}
Clockwork.run
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment