Parcourir la source

update document

xuxueli il y a 6 ans
Parent
révision
7c0d119f52

+ 11 - 2
xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobScheduleHelper.java Voir le fichier

38
             public void run() {
38
             public void run() {
39
 
39
 
40
                 try {
40
                 try {
41
-                    TimeUnit.MILLISECONDS.sleep(5000);
41
+                    TimeUnit.MILLISECONDS.sleep(5000 + System.currentTimeMillis()%1000 );
42
                 } catch (InterruptedException e) {
42
                 } catch (InterruptedException e) {
43
                     if (!toStop) {
43
                     if (!toStop) {
44
                         logger.error(e.getMessage(), e);
44
                         logger.error(e.getMessage(), e);
45
                     }
45
                     }
46
                 }
46
                 }
47
-                logger.info(">>>>>>>>> init xxl-job admin scheduler running.");
47
+                logger.info(">>>>>>>>> init xxl-job admin scheduler success.");
48
 
48
 
49
                 while (!toStop) {
49
                 while (!toStop) {
50
 
50
 
166
         ringThread = new Thread(new Runnable() {
166
         ringThread = new Thread(new Runnable() {
167
             @Override
167
             @Override
168
             public void run() {
168
             public void run() {
169
+
170
+                try {
171
+                    TimeUnit.MILLISECONDS.sleep(System.currentTimeMillis()%1000 );
172
+                } catch (InterruptedException e) {
173
+                    if (!toStop) {
174
+                        logger.error(e.getMessage(), e);
175
+                    }
176
+                }
177
+
169
                 int lastSecond = -1;
178
                 int lastSecond = -1;
170
                 while (!toStop) {
179
                 while (!toStop) {
171
 
180