Skip to content

Settings — Scheduler

The Scheduler page is where every recurring job in Sublarr lives. It’s the operations console: see when each job last ran, when it’ll next fire, whether it succeeded, and force a run-now or pause without restarting the container. Backed by APScheduler with a SQLAlchemy job store, so jobs survive restarts with their next-fire-time intact.

The page shows one row per registered job. Six jobs ship out of the box:

JobDefault triggerEffect
wanted_scannerevery 6 hWalks the library, queues searches for items missing target language.
wanted_searchevery 4 hProcesses the wanted queue (provider calls).
cleanupnightly 03:00Runs cleanup rules: orphan delete, format upgrades, trash prune.
upgrade_scanevery 24 hScans for upgrade candidates against existing subtitles.
anidb_syncevery 30 daysRefreshes the offline AniDB dump.
scheduler_history_cleanupnightly 04:00Prunes scheduler history older than the configured retention.

Plugins can register their own jobs; those appear in the list with a plugin:<name>: prefix on the job ID.

ColumnEffect
Job IDUnique identifier. Human-readable for built-in jobs.
TriggerCurrent trigger expression — interval (every 6h) or cron (0 3 * * *). Edit inline.
Last runTimestamp + outcome (ok / failed / skipped_overlap).
Next runWhen the next firing is scheduled.
Runtime (avg)Median wall-clock time over the last 30 runs.
Run nowTriggers the job out-of-band. Respects per-job concurrency lock.
PauseSuspends future firings without removing the job.
Edit triggerOpen the trigger editor — interval or cron.
HistoryDrawer with the last 100 runs and their outcomes.
Reset to defaultRestore the trigger to the shipped default. Useful if a custom edit is causing issues.
TypeEditor fieldExample
Intervalhours / minutes / secondsevery 6h (every 6 hours)
Cronminute, hour, day, month, day-of-week0 3 * * * (3:00 AM daily)

Cron is preferred for “fire at a specific time of day” jobs (cleanup, anidb_sync). Interval is preferred for “fire every X” jobs (scanners, queue drains).

Clicking Run now:

  1. Queues an immediate firing — bypasses the next scheduled time.
  2. Acquires the per-job lock — if a scheduled run is currently in-flight, the run-now waits.
  3. Records the run as manual: true in history so you can distinguish from scheduled firings.

If a manual run-now collides with a scheduled tick, the second-arriving fire is recorded as skipped_overlap and not run twice.

Pausing keeps the job in the registry but skips firings until resumed. Useful for:

ScenarioAction
Maintenance window — don’t run the scannerPause wanted_scanner until done.
Provider rate-limit incidentPause everything that calls providers.
Investigating a misbehaving jobPause to observe state without further triggering.

Paused jobs show a paused badge; their Next run is replaced with paused.

The History drawer shows recent runs with full timing breakdown:

ColumnEffect
Started atWhen the run began.
Finished atWhen the run ended (or running if in-flight).
DurationWall-clock time.
Outcomeok / failed / cancelled / skipped_overlap.
Items processedCount of meaningful work units (varies per job).
ErrorTruncated stack trace on failure; click for full.

Per-job retention is configured via the scheduler_history_cleanup job (default 30 days).

Sublarr is designed to run as a single primary instance. Running multiple replicas with the same database would cause every job to fire on every replica.

Set SUBLARR_SCHEDULER_ROLE=disabled on all replicas except the primary to prevent duplicate firings. The primary defaults to primary.

ValueBehaviour
primary (default)Scheduler runs.
disabledScheduler is suspended; replica only serves API/UI traffic.
anything elseStartup raises an error.

Plugins or operators with API access can register custom jobs via POST /api/v1/scheduler/jobs. Custom jobs require a Python callable resolvable at the configured module path; see Plugin Development for the registration pattern.

The header shows aggregate health:

TileMeaning
Total jobsRegistered jobs (built-in + plugin).
ActiveNot paused, not in-flight.
RunningCurrently firing.
Failed (last 24h)Jobs with at least one failure in the last day.

Three or more failures in a row on the same job triggers the scheduler_job_failed notification event.