Skip to content

Commit b75d7ee

Browse files
committed
add scheduled autoupdate check
1 parent 27f1668 commit b75d7ee

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package main
66
import (
77
"flag"
88
log "github.com/Sirupsen/logrus"
9+
"github.com/carlescere/scheduler"
910
"github.com/gin-gonic/gin"
1011
"github.com/itsjamie/gin-cors"
1112
"github.com/kardianos/osext"
@@ -126,7 +127,10 @@ func main() {
126127
}
127128

128129
if updater != nil {
129-
go updater.BackgroundRun()
130+
updater_job := func() {
131+
go updater.BackgroundRun()
132+
}
133+
scheduler.Every(5).Minutes().Run(updater_job)
130134
}
131135
}
132136

0 commit comments

Comments
 (0)