Last active
October 21, 2015 16:00
-
-
Save tuphamphuong/16f1819039f517622a81 to your computer and use it in GitHub Desktop.
Simple Akka scheduler by new thread
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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