GuidesDevelopersApps and services
Cron workers (crons/*)
Scheduled jobs are small Bun packages with their own package.json, railway.json, and entry src/index.ts. Typical responsibilities:
| Package | Role |
|---|---|
@surplus/analyticsCacheCron (crons/analyticsCache) | Refreshes analytics cache / materializations used by reporting endpoints |
@surplus/postgresBackupCron (crons/postgresBackup) | Database backup automation |
@surplus/fileStorageBackupCron (crons/fileStorageBackup) | Object storage backup automation |
Running locally
cd crons/analyticsCache
bun run startEach cron’s README (if present) and railway.json describe schedules and required environment variables.