Skip to content

Instantly share code, notes, and snippets.

@tahnok
Created August 10, 2012 19:18
Show Gist options
  • Save tahnok/3317036 to your computer and use it in GitHub Desktop.
Save tahnok/3317036 to your computer and use it in GitHub Desktop.
# :first_in sets how long it takes before the job is first run. In this case, it is run immediately
SCHEDULER.every '1m', :first_in => 0 do |job|
send_event('widget_id', {text: "I am #{%w(happy sad hungry).sample}"})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment