Skip to content

Cron Job Schedule

The cron job is scheduled to run every 15 minutes, Monday to Friday, at 9:30 AM.

javascript
cron.schedule('*/15 * * * *', async () => {
  console.log('Running YouTube data fetch job ...');
  
  try {
    await fetchAndUpdatePlaylistNames();
    await fetchYouTubeData();
  } catch (error) {
    console.error('Error running scheduled tasks:', error.message, error.stack);
  }
});

Purpose: The cron job fetches YouTube data at regular intervals to ensure that new videos are constantly being processed and sent to Rock RMS. Job Schedule: Every 15 minutes during working days. javascript Copy code

Explore and learn. Released under the MIT License.