mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-22 06:28:10 +02:00
feat(analytics): Implement Analytics Dashboard and Token Management
This commit is contained in:
1 parent
b38f082d6e
commit
f8ddb44e38
822 files changed
+132545
-51
No files matched your search
@@ -0,0 +1,11 @@
|
||||
import cron from 'node-cron';
|
||||
import { TokenManager } from '../services/token_manager';
|
||||
|
||||
export function startTokenCron() {
|
||||
// Run every day at midnight (00:00)
|
||||
cron.schedule('0 0 * * *', async () => {
|
||||
console.log('[Cron] Running daily token check...');
|
||||
await TokenManager.checkAndRefreshTokens();
|
||||
});
|
||||
console.log('[Cron] Token refresh job scheduled (0 0 * * *).');
|
||||
}
|
||||
Reference in new issue
Block a user