Skip to content

Instantly share code, notes, and snippets.

@bluemutedwisdom
Forked from pushmatrix/sample_job.rb
Created June 20, 2018 14:10
Show Gist options
  • Select an option

  • Save bluemutedwisdom/7ca285638810a24dfb8d7aab6b69dae8 to your computer and use it in GitHub Desktop.

Select an option

Save bluemutedwisdom/7ca285638810a24dfb8d7aab6b69dae8 to your computer and use it in GitHub Desktop.
Sample Dashing Job
# :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('karma', { current: rand(1000) })
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment