Skip to content

Instantly share code, notes, and snippets.

@itsderek23
Created March 20, 2013 13:47
Show Gist options
  • Save itsderek23/5204746 to your computer and use it in GitHub Desktop.
Save itsderek23/5204746 to your computer and use it in GitHub Desktop.
Scout Plugin that runs at a custom interval
class CustomInterval < Scout::Plugin
def build_report
interval = 15*60 # 15 minute interval
if @last_run.nil? or Time.now > @last_run + interval
# it's time to report
report(:metric => rand)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment