Fix cron job connection to daily board backup

This commit is contained in:
Jeff-Emmett 2025-04-08 15:49:34 -07:00
parent 5ebd37dd6c
commit 7221f94ca6
1 changed files with 9 additions and 2 deletions

View File

@ -380,5 +380,12 @@ router
})
})
// export our router for cloudflare
export default router
// Add this before the router definition
export default {
fetch: router.handle,
scheduled: async (_event: ScheduledEvent, env: Environment, _ctx: ExecutionContext) => {
console.log('Running scheduled backup...');
const result = await backupAllBoards(env);
console.log('Backup result:', result);
}
};