Skip to content

Instantly share code, notes, and snippets.

@tuphamphuong
Last active October 21, 2015 16:00
Show Gist options
  • Save tuphamphuong/16f1819039f517622a81 to your computer and use it in GitHub Desktop.
Save tuphamphuong/16f1819039f517622a81 to your computer and use it in GitHub Desktop.
Simple Akka scheduler by new thread
Akka.system().scheduler().schedule(
Duration.create(0, TimeUnit.MILLISECONDS),
Duration.create(5, TimeUnit.MILLISECONDS), //Frequency 5 minutes
new Runnable() {
public void run() {
Logger.debug("Run from Akka scheduler");
}
},
Akka.system().dispatcher()
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment