Kustos
Manage billing
Wiki / Automation & activity

Runs (the normal way)

A run is a fixed pipeline that fires its steps in order. Enable the steps you want and give the run a schedule.

  • Runs never overlap. If one comes due while another is running, it queues behind it.
  • Each run records step detail — what each step did, and for library operations, what it would have changed.
  • Runs wait while Plex is not answering. Kustos looks at Plex every 30 seconds. After two failed looks in a row, queued runs stay queued, and Plex-heavy tasks and cleanup wait for a later tick; a held run reads "waiting for Plex to answer again". Everything carries on by itself once Plex answers. A run already going is stopped and re-queued only when Plex has stopped answering altogether, not when it is merely busy with a scan.

Restart Plex if it stops answering, one of the switches across the top of Activity → Tasks, is off by default. With it on, and Plex on this machine, Kustos restarts a Plex that has not answered for 3 minutes, at most once in 30 minutes and never during a Plex update. A Plex busy with its own scan is left alone; one that stays stuck for 15 minutes with no scan or task of its own is restarted, at most once in 2 hours. Kustos starts Plex again through a Windows task. When that task is the one thing missing, the switch is greyed and a Set up button beside it makes the task, as the account Plex runs under, with no password asked.

Set up your first run

Runs already exist — you are enabling and scheduling one, not building it from nothing.

  1. Open Activity → Tasks and pick the run whose job matches what you want kept current. The names say what each one is for.
  2. Enable the steps you want. Every step is optional, and a run with a step switched off simply skips it. Leave off anything you have not configured yet: a step with nothing to do is wasted time in the pipeline, not an error.
  3. Give it a schedule. Intervals are expressed in the timezone from Settings → General, and changing that timezone needs a restart before the displayed next-run times and the actual firing times agree.
  4. Press Run now once, rather than waiting for the schedule. You want to see it work while you are looking at it.
  5. Read the step detail. Each step reports what it did.
  6. Check the next-run time. If it is not what you expected, the timezone is the usual reason.

If a step you wanted is greyed out in the task list below, a run already drives it. That is the system stopping it running twice, not a fault.

The runs, and what each is for

Six exist. You are picking one, not building one.

RunCoversWhat it is for
Full RunEverythingThe whole pipeline for both libraries. The slow one — hours on a large library
TV LibraryTVThe full pipeline for shows only
Movie LibraryMoviesThe same, for films
Artwork — AllTV + MoviesThe artwork half of a library run, with no overlays: scrape, folder assets, then posters, backgrounds and title cards
Artwork — TVTVThe same, for shows
Artwork — MoviesMoviesThe same, for films (no title cards — movies have none)

The Artwork runs are off, with no schedule, until you give them one. They exist to be pressed, for when you want fresh artwork without a full library pass or a redraw of every overlay. Turn one on and set its window to schedule it.

The steps, in the order they fire

A run fires its steps in this order, and skips any you have switched off. A step with nothing to do is a stated no-op, not an error.

A step a resumed run had already finished counts as ok, so the run card reads "12 steps ok (3 carried over)" rather than counting it as skipped. A run that hung and had to be stopped by Kustos reads as failed and sends a failure alert; only a run you stopped yourself reads as stopped.

StepWhat it doesWhere
Library syncBrings the *arrs and Plex into agreement about what existsFull and Library runs
CollectionsBuilds and refreshes your collectionsFull and Library runs
Delete emptyRemoves collections that ended up with no membersFull and Library runs (switch off per run)
Metadata backupBacks up each library's Plex metadata, the undo for the library operations after itFull and Library runs (switch off per run)
Library operationsWhatever you enabled on a library's Operations panel, including genre mapping, which has no step of its own. A no-op until you switch something on thereFull and Library runs (switch off per run)
ScrapeFinds artwork from your sources — titlecards and posters, re-pulls enrolled sets, TPDbEvery run
Folder assetsTakes in artwork you dropped into the asset foldersEvery run
Posters / Backgrounds / TitlecardsDraws artwork from your templates. Three separate steps; movie runs have no title cardsEvery run
OverlaysComposites badges and overlays onto the finished artFull and Library runs — never the Artwork runs
Empty Plex trashEmpties Plex's own trashFull and Library runs (off until you switch it on per run) — see below
Kustos database backupBacks up Kustos's own databaseFull and Library runs (switch off per run)

The Full Run and the Library runs carry the same maintenance steps. If you run both, switch the maintenance steps off on the Library runs so they happen once a day, not twice.

Empty Plex trash is OFF by default, and it is the one step that cannot be undone

Every other step is recoverable by running it again. This one is not, so it is the only step that ships switched off and has to be turned on deliberately.

What makes it serious rather than tidy: if your media drive was offline the last time Plex scanned, Plex has your whole library sitting in its trash. Emptying it removes those items from Plex permanently and takes watch history, ratings, play counts and hand-made collection membership with them. Kustos's nightly backup is of Kustos's database, so it restores none of that.

There is no confirmation, no dry run and no count, because it is Plex's own operation — and nothing in Kustos records which titles left.

The switch also fails closed: if the setting cannot be read, the step stays off rather than re-arming itself.