🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Refactor cron job initialization to improve efficiency
Bill Yang60779335956f
diff --git a/server/src/cron/index.ts b/server/src/cron/index.tsindex b7028cd7f..e0cf542b6 100644--- a/server/src/cron/index.ts+++ b/server/src/cron/index.ts@@ -8,9 +8,8 @@ export async function initializeCronJobs() {if (IS_CLOUD) {// Schedule the monthly usage checker to run every 5 minutes- const task = cron.schedule("*/5 * * * *", updateUsersMonthlyUsage);-- await task.execute()+ cron.schedule("*/5 * * * *", updateUsersMonthlyUsage);+ updateUsersMonthlyUsage();}cron.schedule("*/60 * * * * *", cleanupOldSessions);