Skip to content

Instantly share code, notes, and snippets.

@BanzaiMan
Created October 20, 2009 02:33
Show Gist options
  • Select an option

  • Save BanzaiMan/213942 to your computer and use it in GitHub Desktop.

Select an option

Save BanzaiMan/213942 to your computer and use it in GitHub Desktop.
module Termtter::Client
config.plugins.jiho.set_default( :format, '%c' )
config.plugins.jiho.set_default( :interval, 3600 )
add_task( :name => :jiho, :interval => 1 ) do
begin
if (Time.now.to_i % config.plugins.jiho.interval == 0)
puts Time.now.strftime(config.plugins.jiho.format)
end
rescue Exception => e
handle_error(e)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment