fix: use DailyJob
This commit is contained in:
parent
96ec3b8501
commit
c63f7ef50b
|
@ -40,7 +40,7 @@ type PriceTracker struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p PriceTracker) LoadInitialTasks(cron cron.CronService) error {
|
func (p PriceTracker) LoadInitialTasks(cron cron.CronService) error {
|
||||||
job := gocron.DurationJob(time.Minute)
|
job := gocron.DailyJob(1, gocron.NewAtTimes(gocron.NewAtTime(0, 0, 0)))
|
||||||
_, err := cron.Scheduler().NewJob(
|
_, err := cron.Scheduler().NewJob(
|
||||||
job,
|
job,
|
||||||
gocron.NewTask(p.recordRate),
|
gocron.NewTask(p.recordRate),
|
||||||
|
|
Loading…
Reference in New Issue