Last active
May 30, 2020 15:26
-
-
Save Anmol-Singh-Jaggi/07c9a4be06bf35cc6698d0812597be7c to your computer and use it in GitHub Desktop.
blog scheduler
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
@Override | |
void run() | |
{ | |
while(true) | |
{ | |
Thread.sleep(job.getNextExecutionTime() - currentTime()); | |
job.execute(); | |
job.setNextExecutionTime(currentTime() + job.getExecutionInterval()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment