From 2839a615fd383eb7b90e7cf41dae09292a33416d Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Wed, 1 Apr 2026 09:18:36 +0200 Subject: [PATCH] feat: implement automated sync service with cron scheduling and web dashboard --- sync/index.js | 6 +++--- sync/server.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sync/index.js b/sync/index.js index 15b088e..805c27c 100644 --- a/sync/index.js +++ b/sync/index.js @@ -78,8 +78,8 @@ if (forceMode) { }); } else { startDashboard(); - console.log('Service sync démarré — cron: 0 6 * * * (6h00 chaque nuit)'); - cron.schedule('0 6 * * *', () => { + console.log('Service sync démarré — cron: 45 6 * * * Europe/Paris (6h45 chaque nuit)'); + cron.schedule('45 6 * * *', () => { syncAll(false).catch(err => console.error('Erreur cron sync:', err.message)); - }); + }, { timezone: 'Europe/Paris' }); } diff --git a/sync/server.js b/sync/server.js index 2ddf952..b28e94d 100644 --- a/sync/server.js +++ b/sync/server.js @@ -85,7 +85,7 @@ app.get('/api/logs', (req, res) => { app.get('/api/next', (req, res) => { const now = new Date(); const next = new Date(now); - next.setHours(3, 0, 0, 0); + next.setHours(6, 45, 0, 0); if (next <= now) next.setDate(next.getDate() + 1); res.json({ next: next.toISOString() }); });