From 1a9a327a3013dfaac6811a1a5273c02064547bcc Mon Sep 17 00:00:00 2001 From: Petru Paler Date: Thu, 22 Jan 2026 12:57:59 +0000 Subject: [PATCH] Increase Garmin sync frequency to every 3 hours 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 --- src/instrumentation.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/instrumentation.ts b/src/instrumentation.ts index c899969..ce3c50f 100644 --- a/src/instrumentation.ts +++ b/src/instrumentation.ts @@ -49,15 +49,14 @@ export async function register() { triggerCronEndpoint("notifications", "Notifications"); }); - // Schedule Garmin sync 4 times daily (every 6 hours) to ensure data is available - // before European morning notifications - cron.default.schedule("0 0,6,12,18 * * *", () => { + // Schedule Garmin sync 8 times daily (every 3 hours) to keep data fresh + cron.default.schedule("0 */3 * * *", () => { console.log("[cron] Triggering Garmin sync..."); triggerCronEndpoint("garmin-sync", "Garmin sync"); }); 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", ); } }