Skip to content

Instantly share code, notes, and snippets.

@ywjno
Created May 9, 2012 07:26
Show Gist options
  • Save ywjno/2642667 to your computer and use it in GitHub Desktop.
Save ywjno/2642667 to your computer and use it in GitHub Desktop.
test scheduler
# encoding: utf-8
require 'rubygems'
require 'rufus/scheduler'
scheduler = Rufus::Scheduler.start_new
puts "start work at #{Time.new.strftime('%Y-%m-%d %H:%M:%S')}"
scheduler.every '1m' do
puts "start work at #{Time.new.strftime('%Y-%m-%d %H:%M:%S')}"
end
scheduler.join
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment