Scheduled jobs
The API runs these jobs by itself: nothing to schedule on the server. Times are the server’s, UTC in the default images. Admin › Jobs & tasks shows each job’s recent runs and runs one by hand.
| Job | When | What it does | Healthchecks.io variable |
|---|---|---|---|
| New episodes | Every hour | Finds the episodes newly out for the shows people follow. | HEALTHCHECKS_NOTIFICATIONS_SCAN_URL |
| Notification digests | Every hour | Sends each person’s digest at their local time: 6 p.m. for the daily one, Monday 9 a.m. for the weekly one. | HEALTHCHECKS_NOTIFICATIONS_DIGEST_URL |
| Paused works reminder | Every hour | On the first Monday of the month, 9 a.m. local time, reminds those who turned it on of the works they set aside. | HEALTHCHECKS_PAUSED_REMINDER_URL |
| Films and series refresh | Every 6 hours | Refreshes tracked titles not synced for a day (a week for an ended series), so new episodes are known before the hourly check. | HEALTHCHECKS_MEDIA_REFRESH_STALE_URL |
| Games refresh | Every 6 hours | The same for games, up to 500 a run. | HEALTHCHECKS_GAMES_REFRESH_STALE_URL |
| Books refresh | Every 6 hours | Books not synced for a week, up to 100 a run: Open Library is volunteer-run. | HEALTHCHECKS_BOOKS_REFRESH_STALE_URL |
| Music refresh | Every 6 hours | Albums not synced for a week, up to 100 a run, one at a time: MusicBrainz takes one request a second. | HEALTHCHECKS_MUSIC_REFRESH_STALE_URL |
| Backup | 3 a.m. | Dumps and encrypts the database, keeping the last seven: see Backups. | HEALTHCHECKS_BACKUP_URL |
| XP reconciliation | 4 a.m. | Takes back experience points whose cause is gone (an episode unticked, a review deleted), then recounts totals. | HEALTHCHECKS_GAMIFICATION_RECONCILE_URL |
| Achievements sweep | 5 a.m. | Awards any achievement missed along the way, imports included: accounts active in the last two days, all on Sundays. | HEALTHCHECKS_GAMIFICATION_ACHIEVEMENTS_SWEEP_URL |
| Inactive accounts | 5 a.m. | Warns accounts unused for 2 years by email, and deletes them after 3. Any sign-in cancels the warning. | HEALTHCHECKS_INACTIVE_ACCOUNTS_SCAN_URL |
| Scheduled deletions | 5:15 a.m. | Reminds accounts whose deletion is 2 days away, then deletes those whose 14 days are over. | HEALTHCHECKS_SCHEDULED_DELETIONS_URL |
| Update check | 5:30 a.m. | Looks up the latest version, shown in Admin › Services, and sends the telemetry. Turned off by UPDATE_CHECK_ENABLED=false. |
HEALTHCHECKS_UPDATE_CHECK_URL |
| API keys | 6 a.m. | Warns a week before a key expires, and deletes keys unused for a year. | HEALTHCHECKS_API_KEYS_MAINTENANCE_URL |
| Reports digest | 7 a.m. | Emails administrators the pending moderation reports, if there are any. | HEALTHCHECKS_REPORTS_DIGEST_URL |
| Security log clean-up | 6 a.m. | Deletes security log entries older than a year, and sign-in codes and links that expired unused. | HEALTHCHECKS_SECURITY_PURGE_URL |
| Invitations clean-up | 6:30 a.m. | Deletes invitations left unused for 30 days after they expired or were revoked. | HEALTHCHECKS_INVITATIONS_PURGE_URL |
| Notifications clean-up | 7 a.m. | Deletes notifications read over 90 days ago, and new-release records once 30 days old. | HEALTHCHECKS_NOTIFICATIONS_PURGE_URL |
To be alerted when a job stops running, see Monitoring.
Worth knowing
Section titled “Worth knowing”A job runs once at a time. Each run takes a lock in the database, so a job started by hand while it is already running is refused (Admin says so), and a second API container, if you started one, skips it rather than running it twice.
Inactive accounts are deleted three years after their last use, only once a warning email has actually gone out. Without SMTP, no warning can be sent, so no account is ever deleted for inactivity. A failed send is retried the next day.