Cron job overview
| Job name | Endpoint | Schedule | What it does |
|---|---|---|---|
| Replay poller | /api/cron/poll-replays | Every 5 minutes | Checks ballchasing.com for parsed replay data and stores results |
| Match status updater | /api/cron/update-matches | Every 5 minutes | Opens check-in windows, marks forfeits, auto-confirms pending results |
| Season transition | /api/cron/season-transition | Every 10 minutes | Advances season phases when their date conditions are met |
| Standings recalculator | /api/cron/recalculate-standings | Every 15 minutes | Recomputes all division standings from confirmed match results |
Detailed job descriptions
Replay poller — /api/cron/poll-replays
Replay poller — /api/cron/poll-replays
Purpose: After a replay is uploaded to ballchasing.com, parsing is typically triggered via a webhook. If the webhook fails or is delayed, this job polls all replays that are in
PROCESSING status and checks whether ballchasing has finished parsing them.What it does:- Fetches all match game records with replay status
PROCESSING - Calls the ballchasing.com API for each to check parse status
- If parsed successfully, stores the extracted stats (goals, assists, saves, shots, demos per player)
- Updates the game status to
PARSEDorFAILED
PROCESSING for more than 15 minutes, manually trigger this job to force a status check.Schedule: Every 5 minutes, 24/7.Match status updater — /api/cron/update-matches
Match status updater — /api/cron/update-matches
Purpose: Keeps match statuses current without requiring manual intervention.What it does:
- Finds all
SCHEDULEDmatches whose check-in window has opened (30 min before start time) and sets them toCHECK_IN_OPEN - Finds all
CHECK_IN_OPENmatches whose start time has passed and checks team check-in status:- Both teams checked in → set to
IN_PROGRESS - One or both teams did not check in → set to
FORFEITEDfor the missing team(s)
- Both teams checked in → set to
- Finds all
IN_PROGRESSmatches with a submitted result that has been pending for 24+ hours → auto-confirms and sets toCOMPLETED
IN_PROGRESS but is still showing SCHEDULED), trigger this job.Schedule: Every 5 minutes.Season transition — /api/cron/season-transition
Season transition — /api/cron/season-transition
Purpose: Automatically advances seasons through their lifecycle phases based on configured dates.What it does:
- Finds all seasons where the current date has passed a phase transition date
UPCOMING→REGISTRATIONwhenregistration_open_dateis reachedREGISTRATION→ACTIVEwhenregistration_close_dateis reached and the season start date has passedACTIVE→PLAYOFFSwhen all regular season weeks are completed (or a manual trigger by staff)PLAYOFFS→COMPLETEDwhen all playoff matches are resolved
Standings recalculator — /api/cron/recalculate-standings
Standings recalculator — /api/cron/recalculate-standings
Purpose: Keeps standings accurate. Because match results can be confirmed asynchronously, standings are recalculated on a schedule rather than synchronously on every confirmation event.What it does:
- Fetches all
COMPLETEDmatches for each active season - Recomputes wins, losses, draws, goals for, goals against, and points for each team
- Re-sorts teams by points (then tiebreakers) and updates the standing rank
- Writes the updated standings to the database
Triggering jobs manually
You can trigger any cron job manually from two places: Option 1 — Admin panel UI (recommended):- Go to c3esports.com/admin/cron.
- Find the job in the list.
- Click Trigger Now.
- The job runs immediately. Output and any errors are shown inline.
Option 2 — Direct API call (for testing/scripting):
poll-replays with the relevant job path. Admin API keys are managed in your profile settings under Developer.
All manual cron triggers are logged in the audit log with your username, which job was triggered, and when.
Common scenarios
| Problem | Solution |
|---|---|
| Replay stuck in “Processing” | Trigger poll-replays |
| Match shows wrong status | Trigger update-matches |
| Standings not updated after score override | Trigger recalculate-standings |
| Season not advancing to next phase | Trigger season-transition |
