Skip to content

Instantly share code, notes, and snippets.

@kdabir
Last active November 20, 2017 08:26
Show Gist options
  • Save kdabir/3176945 to your computer and use it in GitHub Desktop.
Save kdabir/3176945 to your computer and use it in GitHub Desktop.
Creating and Scheduling a TimerTask in groovy
def count = 0
new Timer().schedule({
println count++
} as TimerTask, 1000, 3000) //magic numbers are initial-delay & repeat-interval
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment