The current season leaderboard data is updated every 10 seconds via a cron job.
Set up a cron job to call the update endpoint every 10 seconds:
# Example using curl in a cron job or scheduled task
*/10 * * * * curl -X GET "https://your-domain.com/api/leaderboardAPI/update-current-season?secret=YOUR_SECRET"
Environment Variable (optional but recommended):
LEADERBOARD_CRON_SECRET in your environment variablesGET /api/leaderboardAPI/update-current-season?secret=YOUR_SECRET query parameterGET /api/leaderboardAPI/current-season?server=allserver (optional): Server ID (default: “all”)Cron Job (update-current-season):
Cache API (current-season):
Client Store:
To update the current season, simply edit src/lib/leaderboard-config.ts:
export const CURRENT_SEASON_MONTH = "november"; // Change this
export const CURRENT_SEASON_YEAR = "2025"; // Change this if needed
Then deploy. The seasons array will be automatically regenerated with the new current season marked as active.