Created
April 17, 2019 22:19
-
-
Save corneliouzbett/fca421ecde050175ddde04ecffd8f041 to your computer and use it in GitHub Desktop.
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
public void cronJobSch() { | |
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); | |
Date now = new Date(); | |
String strDate = sdf.format(now); | |
System.out.println("Java cron job expression:: " + strDate); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following is a sample code that shows how to execute the task every minute starting at 9:00 AM and ending at 9:59 AM, every day