updating leaderboards every 15 minutes

This commit is contained in:
Miodec 2022-03-12 21:47:43 +01:00
parent d80ad81746
commit 6459983840
2 changed files with 2 additions and 2 deletions

View file

@ -3,7 +3,7 @@ import BotDAO from "../dao/bot";
import { Document, WithId } from "mongodb";
import LeaderboardsDAO from "../dao/leaderboards";
const CRON_SCHEDULE = "30 4/5 * * * *";
const CRON_SCHEDULE = "30 14/15 * * * *";
const RECENT_AGE_MINUTES = 10;
const RECENT_AGE_MILLISECONDS = RECENT_AGE_MINUTES * 60 * 1000;

View file

@ -61,7 +61,7 @@ function stopTimer(): void {
function updateTimerElement(): void {
const date = new Date();
const minutesToNextUpdate = 4 - (date.getMinutes() % 5);
const minutesToNextUpdate = 14 - (date.getMinutes() % 15);
const secondsToNextUpdate = 60 - date.getSeconds();
const totalSeconds = minutesToNextUpdate * 60 + secondsToNextUpdate;
$("#leaderboards .subTitle").text(