From 902003ca91e325be3fee54c011a84f3bc44a751b Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Sat, 7 Oct 2023 10:57:14 +1100 Subject: [PATCH] Update time for `resetAllData()` --- src/models/userLevels.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/userLevels.ts b/src/models/userLevels.ts index 0024513..1e2a3d4 100644 --- a/src/models/userLevels.ts +++ b/src/models/userLevels.ts @@ -21,8 +21,8 @@ export default class userLevels extends Schema { this._content = Schema; } async resetAllData(){ - // Every 1st of January at 00:00 - cron.schedule('0 0 1 1 *', async()=>{ + // Every 1st of January at 11:00 (Midnight in London, 11AM in Sydney) + cron.schedule('0 11 1 1 *', async()=>{ Logger.forwardToConsole('log', 'Cron', 'Running job "resetAllData", this is activated every 1st of January'); const countDataBeforeReset = await this._content.countDocuments(); Logger.forwardToConsole('log', 'Cron:resetAllData', `Counted ${countDataBeforeReset.toLocaleString()} documents before reset`);