Files
open-im-server/cmd/crontask/main.go
T

19 lines
291 B
Go
Raw Normal View History

2022-08-10 12:07:32 +08:00
package main
2022-08-09 16:38:33 +08:00
import (
2023-02-23 19:15:30 +08:00
"OpenIM/internal/task"
2023-02-23 19:41:44 +08:00
"OpenIM/pkg/common/config"
2022-08-09 16:38:33 +08:00
"fmt"
2022-11-18 16:59:31 +08:00
"time"
2022-08-09 16:38:33 +08:00
)
func main() {
2023-02-23 18:20:45 +08:00
fmt.Println(time.Now(), "start cronTask")
2023-02-24 17:42:01 +08:00
if err := config.InitConfig(); err != nil {
2023-02-23 19:51:58 +08:00
panic(err.Error())
}
2023-02-23 18:20:45 +08:00
if err := task.StartCronTask(); err != nil {
panic(err.Error())
}
2022-08-09 16:38:33 +08:00
}