Updating the gocron job to run at 8am sydney time each day
This commit is contained in:
parent
e4453a56fc
commit
2a601df758
|
|
@ -256,8 +256,13 @@ func main() {
|
|||
|
||||
/* Cron Jobs */
|
||||
go func() {
|
||||
s := gocron.NewScheduler(time.UTC)
|
||||
s.Every(10).Second().Do(func() {
|
||||
loc, err := time.LoadLocation("Australia/Sydney")
|
||||
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
|
||||
quoteHandler.DailyQuoteExpirationCheck()
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue