Permalink
Browse files

simple scheduling

  • Loading branch information...
thomasjachmann committed Jul 4, 2011
0 parents commit e09eeb3eec26f6d4727488c2831397d85b1989a4
Showing with 49 additions and 0 deletions.
  1. +8 −0 Gemfile
  2. +31 −0 Gemfile.lock
  3. +1 −0 Procfile
  4. +9 −0 crony.rb
@@ -0,0 +1,8 @@
+source :rubygems
+
+gem "rufus-scheduler"
+
+group :development do
+ gem "heroku"
+ gem "foreman"
+end
@@ -0,0 +1,31 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ configuration (1.3.1)
+ foreman (0.19.0)
+ term-ansicolor (~> 1.0.5)
+ thor (>= 0.13.6)
+ heroku (2.3.6)
+ launchy (>= 0.3.2)
+ rest-client (~> 1.6.1)
+ term-ansicolor (~> 1.0.5)
+ launchy (0.4.0)
+ configuration (>= 0.0.5)
+ rake (>= 0.8.1)
+ mime-types (1.16)
+ rake (0.9.2)
+ rest-client (1.6.3)
+ mime-types (>= 1.16)
+ rufus-scheduler (2.0.10)
+ tzinfo (>= 0.3.23)
+ term-ansicolor (1.0.5)
+ thor (0.14.6)
+ tzinfo (0.3.29)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ foreman
+ heroku
+ rufus-scheduler
@@ -0,0 +1 @@
+worker: ruby crony.rb
@@ -0,0 +1,9 @@
+require "rufus/scheduler"
+
+scheduler = Rufus::Scheduler.start_new
+
+scheduler.every "2s" do
+ puts "done waiting... ok, I'll wait another two seconds"
+end
+
+scheduler.join

0 comments on commit e09eeb3

Please sign in to comment.