Browse Source

Fix(booking-job): Fix start time

master
Samuel Pua 3 years ago
parent
commit
635352edbd
  1. 2
      backend/internal/ktmtrainbot/backgroundbookingjob.go

2
backend/internal/ktmtrainbot/backgroundbookingjob.go

@ -77,7 +77,7 @@ func (env *Env) BackgroundJobRunner() {
} else { // if there's job to do } else { // if there's job to do
// Create next run where it's not the past (either from old NextRun or now()) // Create next run where it's not the past (either from old NextRun or now())
timeNow := time.Now() timeNow := time.Now()
startTime := time.Date(timeNow.Year(), timeNow.Month(), timeNow.Day(), 23, 07, 0, 0, timeNow.Location())
startTime := time.Date(timeNow.Year(), timeNow.Month(), timeNow.Day(), 0, 10, 0, 0, timeNow.Location())
endTime := startTime.Add(10 * time.Minute) endTime := startTime.Add(10 * time.Minute)
if timeNow.After(startTime) && timeNow.Before(endTime) { if timeNow.After(startTime) && timeNow.Before(endTime) {

Loading…
Cancel
Save