Cron jobs
Two background jobs are exposed as HTTP endpoints. Both are protected by the cron_hash secret (see
Configuration).
| URL | What it does | Suggested interval |
|---|---|---|
/cron/rankings/<cron_hash> |
Recomputes every player’s ranking points (level × 2 + skill levels + knowledge levels) and rank | every 10–60 min |
/cron/emails/<cron_hash> |
Sends up to 5 queued emails (welcome, confirmation, password reset) | every 1–2 min |
A wrong hash returns Access denied - nice try.
crontab
Section titled “crontab”*/2 * * * * curl -fsS https://game.example.com/cron/emails/YOUR_CRON_HASH >/dev/null*/15 * * * * curl -fsS https://game.example.com/cron/rankings/YOUR_CRON_HASH >/dev/nullDocker
Section titled “Docker”Run the same requests from the host, or from any container on the Compose network:
*/2 * * * * curl -fsS http://localhost:8080/cron/emails/YOUR_CRON_HASH >/dev/null*/15 * * * * curl -fsS http://localhost:8080/cron/rankings/YOUR_CRON_HASH >/dev/null