Fix(booking-job): Fix start booking time
All checks were successful
ktm-booking-bot/ktm-booking-bot/pipeline/head This commit looks good

This commit is contained in:
2022-10-12 23:37:23 +08:00
parent 9c456b72b2
commit b3442b667b
2 changed files with 2 additions and 1 deletions

View File

@@ -13,4 +13,5 @@ TEST_DB_NAME=
TEST_DB_SSL=
COOKIE_STRING=
ALLOW_REGISTRATION=
HEADLESS=
LOGGER_WEBHOOK_URL=

View File

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