Skip to content

Instantly share code, notes, and snippets.

@corneliouzbett
Created April 17, 2019 22:18
Show Gist options
  • Save corneliouzbett/1bea37d5ce061d846b34703ec7ea84dd to your computer and use it in GitHub Desktop.
Save corneliouzbett/1bea37d5ce061d846b34703ec7ea84dd to your computer and use it in GitHub Desktop.
public class Scheduler {
@Scheduled(fixedDelay = 1000, initialDelay = 3000)
public void fixedDelaySch() {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
Date now = new Date();
String strDate = sdf.format(now);
System.out.println("Fixed Delay scheduler:: " + strDate);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment