recommender/cmd/schedule.go

40 lines
592 B
Go
Raw Normal View History

2024-11-06 10:47:56 +00:00
package cmd
import (
2024-11-06 12:35:16 +00:00
"leafdev.top/Ecosystem/recommender/internal/base"
2024-11-06 10:47:56 +00:00
"github.com/spf13/cobra"
)
func init() {
RootCmd.AddCommand(scheduleCmd)
}
var scheduleCmd = &cobra.Command{
Use: "schedule",
Short: "Schedule commands",
Long: `Schedule commands`,
Run: func(cmd *cobra.Command, args []string) {
app, err := CreateApp()
if err != nil {
panic(err)
}
runSchedule(app)
},
}
func runSchedule(app *base.Application) {
// var wg sync.WaitGroup
// var ctx = context.Background()
// wg.Add(1)
// // 启动一个定时器
// go func() {
// }()
// wg.Wait()
}