Skip to content

Instantly share code, notes, and snippets.

/t.rb

Created December 19, 2011 09:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1496397 to your computer and use it in GitHub Desktop.
Save anonymous/1496397 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
require 'rubygems'
require 'rufus/scheduler'
#require 'fib'
scheduler = Rufus::Scheduler::PlainScheduler.start_new
scheduler.in '0m' do
puts 'Louis was here'
sleep 1000
end
scheduler.in '0m' do
puts 'Louis was here again'
sleep 1000
end
while true do
p scheduler.all_jobs
p Thread.list
puts
sleep 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment