Skip to content

Commit

Permalink
fix: fix service run
Browse files Browse the repository at this point in the history
  • Loading branch information
starudream committed Apr 1, 2024
1 parent 3b9ec3d commit b2cea5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/starudream/go-lib/core/v2/slog"
"github.com/starudream/go-lib/cron/v2"
"github.com/starudream/go-lib/ntfy/v2"
"github.com/starudream/go-lib/service/v2"

"github.com/starudream/douyu-task/config"
"github.com/starudream/douyu-task/job"
Expand All @@ -18,7 +19,7 @@ var cronCmd = cobra.NewCommand(func(c *cobra.Command) {
c.Use = "cron"
c.Short = "Run as cron job"
c.RunE = func(cmd *cobra.Command, args []string) error {
return cronRun()
return service.New("douyu-task", nil).Run()
}
})

Expand Down

0 comments on commit b2cea5b

Please sign in to comment.