|
|
|
|
@ -22,13 +22,19 @@ public class MainClass {
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) throws IOException, InterruptedException {
|
|
|
|
|
|
|
|
|
|
boolean isDaemon = false;
|
|
|
|
|
if(args != null && args.length > 0) {
|
|
|
|
|
if(args[0] != null && args[0].equals("daemon")) {
|
|
|
|
|
isDaemon = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
while(true) {
|
|
|
|
|
|
|
|
|
|
do {
|
|
|
|
|
SimpleDateFormat sdf_mm = new SimpleDateFormat("mm");
|
|
|
|
|
String curMinute = sdf_mm.format(new Date());
|
|
|
|
|
|
|
|
|
|
if(!curMinute.endsWith("7")) {
|
|
|
|
|
if(isDaemon && !curMinute.endsWith("7")) {
|
|
|
|
|
Thread.sleep(1000 * 60);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
@ -71,7 +77,7 @@ public class MainClass {
|
|
|
|
|
new ZIP().compress(zipFilePath, txtFilePath);
|
|
|
|
|
txtFile.delete();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} while(isDaemon);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|