Increase Garmin sync frequency to every 3 hours
Some checks failed
Deploy / deploy (push) Has been cancelled

Change cron schedule from 4x daily (0,6,12,18 UTC) to 8x daily
(every 3 hours) to keep body battery and other Garmin data fresher.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-22 12:57:59 +00:00
parent d4b04a17be
commit 1a9a327a30

View File

@@ -49,15 +49,14 @@ export async function register() {
triggerCronEndpoint("notifications", "Notifications"); triggerCronEndpoint("notifications", "Notifications");
}); });
// Schedule Garmin sync 4 times daily (every 6 hours) to ensure data is available // Schedule Garmin sync 8 times daily (every 3 hours) to keep data fresh
// before European morning notifications cron.default.schedule("0 */3 * * *", () => {
cron.default.schedule("0 0,6,12,18 * * *", () => {
console.log("[cron] Triggering Garmin sync..."); console.log("[cron] Triggering Garmin sync...");
triggerCronEndpoint("garmin-sync", "Garmin sync"); triggerCronEndpoint("garmin-sync", "Garmin sync");
}); });
console.log( console.log(
"[cron] Scheduler started - notifications every 15 min, Garmin sync at 00:00/06:00/12:00/18:00 UTC", "[cron] Scheduler started - notifications every 15 min, Garmin sync every 3 hours",
); );
} }
} }