update project path
This commit is contained in:
1 parent
26acdbd0d1
commit
e027e6a259
76 files changed
+2562
-106
No files matched your search
@@ -0,0 +1,19 @@
|
||||
package cronjob
|
||||
|
||||
import (
|
||||
"github.com/robfig/cron/v3"
|
||||
"log"
|
||||
)
|
||||
|
||||
func TestJob(c *cron.Cron) {
|
||||
id, err := c.AddFunc("1 * * * *", func() {
|
||||
|
||||
log.Println("Every hour on the one hour")
|
||||
})
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
log.Println("start error")
|
||||
} else {
|
||||
log.Println("Start Success; ID: %v", id)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user