Procházet zdrojové kódy

定时任务修改

wuyi před 2 roky
rodič
revize
53af204418
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4 1
      src/moments/moments.service.ts

+ 4 - 1
src/moments/moments.service.ts

@@ -34,8 +34,11 @@ export class MomentsService {
         const now = new Date();
         const nextDay = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1)
         const delayTime = nextDay.getTime() - now.getTime()
-        console.log(delayTime)
         setTimeout(() => {
+            this.automaticallySendMoments()
+            setTimeout(() => {
+                this.delay()
+            }, 3 * 60 * 1000)
             setInterval(() => {
                 this.automaticallySendMoments()
                 setTimeout(() => {