Updating the gocron job to run at 8am sydney time each day

This commit is contained in:
Finley Ghosh 2025-07-20 16:53:20 +10:00
parent e4453a56fc
commit 2a601df758

View file

@ -256,8 +256,13 @@ func main() {
/* Cron Jobs */ /* Cron Jobs */
go func() { go func() {
s := gocron.NewScheduler(time.UTC) loc, err := time.LoadLocation("Australia/Sydney")
s.Every(10).Second().Do(func() { if err != nil {
log.Printf("Failed to load Sydney timezone: %v", err)
loc = time.UTC // fallback to UTC
}
s := gocron.NewScheduler(loc)
s.Every(1).Day().At("08:00").Do(func() {
// Checks quotes for reminders and expiry notices // Checks quotes for reminders and expiry notices
quoteHandler.DailyQuoteExpirationCheck() quoteHandler.DailyQuoteExpirationCheck()
}) })