package cmd import ( "kpt-pasture/config" "kpt-pasture/dep" "gitee.com/xuyiping_admin/pkg/svcutil" "github.com/spf13/cobra" ) // CrontabCmd represents the crontab command var CrontabCmd = &cobra.Command{ Use: "crontab", Short: "计划任务", Run: func(cmd *cobra.Command, args []string) { svcutil.WaitFor(config.Options().HTTPServerAddr, func(stop <-chan struct{}) error { dep.DICrontabService().Run(stop) return nil }) }, }