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() }); });