ardasen commited on
Commit
3c7dbd2
·
verified ·
1 Parent(s): 85eb09e

Update server.js

Browse files
Files changed (1) hide show
  1. server.js +2 -1
server.js CHANGED
@@ -24,7 +24,8 @@ const fetchDataAndUpdateCache = async (url, cacheKey) => {
24
  };
25
 
26
  // Schedule to update cache every 15 minutes for all endpoints
27
- cron.schedule('*/15 * * * *', async () => {
 
28
  // Example: Update current season data
29
  await fetchDataAndUpdateCache(`${ERGAST_API_BASE_URL}current.json`, 'currentSeason');
30
 
 
24
  };
25
 
26
  // Schedule to update cache every 15 minutes for all endpoints
27
+ //cron.schedule('*/15 * * * *', async () => {
28
+ cron.schedule('0 */12 * * *', async () => {
29
  // Example: Update current season data
30
  await fetchDataAndUpdateCache(`${ERGAST_API_BASE_URL}current.json`, 'currentSeason');
31