Created
February 4, 2010 08:00
-
-
Save stereosupersonic/294441 to your computer and use it in GitHub Desktop.
every ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def every seconds, &block | |
while true | |
yield | |
sleep seconds | |
end | |
end | |
class Fixnum | |
def minutes | |
self * 60 | |
end | |
end | |
## | |
every 5.Minutes do | |
msg = "Es sind schon wieder 5 Minuten vorbei!" | |
title = "Hallo" | |
system "growlnotify -m \"#{msg}\" -t \"#{title}\"" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment