Go version : go version go1.14 windows/amd64
platform : Windows
Code :
package main
import (
"log"
"gopkg.in/robfig/cron.v2"
"github.com/gin-gonic/gin"
)
func main() {
g := gin.Default()
c := cron.New()
c.AddFunc("0 0 * * *", func() {
log.Println("Job started at 12:00AM")
})
c.AddFunc("0 1 * * *", func() {
log.Println("Job started at 01:00AM")
})
c.AddFunc("15 2 * * *", func() {
log.Println("Job started at 02:15AM")
})
c.AddFunc("5 3 * * *", func() {
log.Println("Job started at 03:05AM")
})
c.AddFunc("35 4 * * *", func() {
log.Println("Job started at 04:35AM")
})
c.AddFunc("50 5 * * *", func() {
log.Println("Job started at 05:50AM")
})
c.Start()
g.Run(":8085")
}
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/CADuKi9pDRJuWBNe1d5OWvAV6LTbUCmjikyvm44fmigzakmzjGg%40mail.gmail.com.