Skip to content

Instantly share code, notes, and snippets.

@Shpigford
Forked from andrewvc/clockwork.rake
Created September 15, 2011 01:05
Show Gist options
  • Save Shpigford/1218275 to your computer and use it in GitHub Desktop.
Save Shpigford/1218275 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