Update event conclusion email schedule and add logging

This commit is contained in:
Ryderjj89
2025-05-26 13:01:21 -04:00
parent 1c6be17961
commit eb7f77167c

View File

@@ -967,11 +967,16 @@ async function sendConclusionEmails() {
}
// Schedule the task to run daily (e.g., at 1:00 AM)
cron.schedule('0 1 * * *', () => {
// Schedule the task to run daily (e.g., at 8:00 AM)
const scheduledTask = cron.schedule('0 8 * * *', () => {
sendConclusionEmails();
}, {
scheduled: true,
timezone: process.env.TZ || 'UTC' // Use TZ environment variable, default to UTC
});
console.log(`Event conclusion email scheduled task scheduled for ${scheduledTask.options.timezone} at ${scheduledTask.options.recoverMissedExecutions ? 'a time based on missed executions' : 'the specified cron pattern'}.`);
// Handle client-side routing
app.get('*', (req: Request, res: Response) => {