Replace custom setInterval scheduler with croner

Swap the hand-rolled Scheduler class (setInterval-based) for croner,
a battle-tested cron library with overlap protection and proper cron
expressions. Consolidate lib/jobs/ into a single lib/cron.ts and
remove the unused admin jobs API route.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-03 18:52:05 -05:00
co-authored by Claude Opus 4.6
parent 2ee20a6aff
commit 0f345c8cd6
8 changed files with 120 additions and 173 deletions
+29 -28
View File
@@ -15,44 +15,45 @@
"db:studio": "drizzle-kit studio"
},
"dependencies": {
"@base-ui/react": "^1.2.0",
"@tabler/icons-react": "^3.38.0",
"@tanstack/react-hotkeys": "^0.3.1",
"better-auth": "^1.5.2",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"date-fns": "^4.1.0",
"@base-ui/react": "1.2.0",
"@tabler/icons-react": "3.38.0",
"@tanstack/react-hotkeys": "0.3.1",
"better-auth": "1.5.2",
"class-variance-authority": "0.7.1",
"clsx": "2.1.1",
"cmdk": "1.1.1",
"croner": "10.0.2-dev.2",
"date-fns": "4.1.0",
"drizzle-orm": "1.0.0-beta.15-859cf75",
"embla-carousel-react": "^8.6.0",
"jotai": "^2.18.0",
"motion": "^12.34.5",
"embla-carousel-react": "8.6.0",
"jotai": "2.18.0",
"motion": "12.34.5",
"next": "16.1.6",
"node-vibrant": "^4.0.4",
"node-vibrant": "4.0.4",
"react": "19.2.4",
"react-day-picker": "^9.14.0",
"react-day-picker": "9.14.0",
"react-dom": "19.2.4",
"react-resizable-panels": "^4.7.0",
"react-resizable-panels": "4.7.0",
"recharts": "2.15.4",
"shadcn": "^3.8.5",
"sonner": "^2.0.7",
"tailwind-merge": "^3.5.0",
"tw-animate-css": "^1.4.0",
"uuid": "^13.0.0",
"vaul": "^1.1.2",
"zod": "^4.3.6"
"shadcn": "3.8.5",
"sonner": "2.0.7",
"tailwind-merge": "3.5.0",
"tw-animate-css": "1.4.0",
"uuid": "13.0.0",
"vaul": "1.1.2",
"zod": "4.3.6"
},
"devDependencies": {
"@biomejs/biome": "2.4.5",
"@types/bun": "^1.3.10",
"@tailwindcss/postcss": "^4.2.1",
"@types/node": "^25.3.3",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@types/bun": "1.3.10",
"@tailwindcss/postcss": "4.2.1",
"@types/node": "25.3.3",
"@types/react": "19.2.14",
"@types/react-dom": "19.2.3",
"babel-plugin-react-compiler": "1.0.0",
"drizzle-kit": "1.0.0-beta.15-859cf75",
"tailwindcss": "^4.2.1",
"typescript": "^5.9.3"
"tailwindcss": "4.2.1",
"typescript": "5.9.3"
},
"packageManager": "bun@1.3.10"
}